How to display the star rating from google sheet?

hi, i have developed a star rating system in google sheet, but how do display this rating in my app? here is an example i have created in google sheet.

please advise with thanks

Hi @Beauchic_Sdn_Bhd! Welcome to the community!

Perhaps you could combine the stars in your Google spreadsheet using concatenate and then bring that into your app.

By the way, how do you get half stars and the empty stars? Could you share the formula you are using?

1 Like

I got interested in this and found that half stars are available in newer UNICODE but I don’t seem to be able to display the half stars on my Mac. So, I suspect that they will not display easily on various devices. Still, I’m very interested in how you are doing this on Google sheets.

hi @Kirk_Masden, i dont think is possible to combine the stars into 1 cell by using concatenate. i have tried the formula, but is not showing up the stars.

here is the link to the file for the stars, you can see the formula an you can try it out too (please make a copy and customize it for yourself):

Please do share with me if you have the solution, thank you :grinning: :blush:

Thanks but you need to share the sheet. I got the following error:

Screen Shot 2020-10-17 at 20.13.45

I made a little app with a virtual column that has the following expression:

concatenate(ifs(floor([yournumber])=1,"★",
floor([yournumber])=2,"★★",
floor([yournumber])=3,"★★★",
floor([yournumber])=4,"★★★★",
floor([yournumber])=5,"★★★★",),
if(floor([yournumber])=[yournumber],"","☆"))

Here is what the result looks like:

Screen Shot 2020-10-17 at 20.43.02 Screen Shot 2020-10-17 at 20.43.20

It’s not the same as yours because I couldn’t find a half-star character.

Also, I don’t think that AppSheet has the equivalent of a rept() function. That would be convenient in such circumstances.

1 Like

It seems that the half star isn’t quite ready for prime time yet, in terms of general adoption.

But, SVG might work for you. SVG can be used in AppSheet:

Please see

1 Like

Try:

left(
  concatenate(
    left(
      "★★★★★",
      floor([yournumber])
    ),
    "☆☆☆☆☆"
  ),
  5
)
4 Likes

Brilliant! I knew there had to be a better solution but couldn’t think of it. The double use of left() is something that I couldn’t imagine but will try to remember. The left at the top just fills the spots that are "left"over from the second left. :wink: Now, if only there were a half star!

2 Likes

opps… try this>>

hoping with this, i can get a better solution on how to appear this stars in the app. thanks.

I see. You’ve combined images. Personally, I think @Steve’s solution is the best one for you, but it doesn’t have the half stars.

If you want a graphic solution, the SVG solution might be good. Or, you could make 11-images, one for each point on your scale (0.0, 0.5., 1.0, 1.5 etc) and use an expression to invoke the proper image based on the value.

1 Like

Another option is based on the tip and trick mentioned below and given by @Rene_Casana_Amaya

The AppSheet icon set has half star icons. So that may be used. However to show combination of empty, half and full stars, the workaround does require around 13 format rules. So this option will also take a bit longer to set up The test app’s screen with with those many format rules shown below.

1 Like

Wow! Thanks! Do you have a sample app? The original sample app seems to have been taken down.

Hi @Kirk_Masden,

Thank you. As you can see in the screen, I had added that star rating configuration to the sample app “Order Capture”. It basically revolves around just two columns and a bunch of similar but numerous format rules, each one for a rating.

I will be glad to share the details of all the format rules and other configuration. I plan to add that as an addendum post in that tips and tricks post thread by @Rene_Casana_Amaya referred above. That I believe will be a proper thread since it expands on idea in the thread.

Hope that will suffice. I will be glad to put together a sample app just in case required.

2 Likes

Great! I’ll follow the thread!