web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Transforming Rating nu...
Power Automate
Answered

Transforming Rating number into stars issues

(0) ShareShare
ReportReport
Posted on by 73

I have created a questionair in teams and user can give a rating from 1 to 5. 

 

With below actions I can transform it into a star rating. 

Everything works well for one user but because I ask multiple users the same questions in the same flow it uses a apply to each and waits. 

If one users anwsers it works but the next users ratings get messed up and it multiples the stars each time. Can I fix this somehow?

 

boby305_0-1700752331682.png

 

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,513 Super User 2025 Season 2 on at

    Before you handle the next user, you have to reset your variable.

  • Verified answer
    Chriddle Profile Picture
    8,513 Super User 2025 Season 2 on at

    Btw, I would not use a loop to create the HTML:

    Chriddle_0-1700754415067.png

    Select

    From: range(0, outputs('StarAmount'))

    Map: string('<span>*</span>')

     

    Compose

    join(body('Select'), '')
  • Chriddle Profile Picture
    8,513 Super User 2025 Season 2 on at

    Better this:

    Chriddle_1-1700754987025.png

    join(take(outputs('Stars'), 4), '')
  • boby305 Profile Picture
    73 on at

    @Chriddle 

     

    You made it seem so easy, thanks buddy!

    I used your second message and it worked.

     

    I am not sure what you meant by your last message, is that another way to do it and if so where do I insert the input that the user selected?

  • Chriddle Profile Picture
    8,513 Super User 2025 Season 2 on at

    Yes, my second approach seems cleaner (IMHO)

    The 4 in this expression is the number of stars

     

    join(take(outputs('Stars'), 4), '')

     

    While Compose "Stars" is an array of star HTMLs, this expression says to take 4 of these elements and join them.

  • boby305 Profile Picture
    73 on at

    ah thanks, got it!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard