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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change the html progre...
Power Apps
Unanswered

Change the html progress bar color dynamically based on another controls fill property

(0) ShareShare
ReportReport
Posted on by 61

Hi Team,

I am using a html text control to make a progress bar and the text is as below..

Everything works fine when i give the background as static color value.

But my need is to set the background color same as another control's(ShapeName) Fill color.

I tried the below code but it throws an Invalid argument type error.What is the mistake i am making here?

"<progress value=""80"" ""red"" max=""100"" style=""Width:60%; background: "&ShapeName.Fill&";height:10px""></progress>"

 

Any help woud be appreciated.

Thank you.

Categories:
I have the same question (0)
  • msabau Profile Picture
    270 on at

    You can't just plop "red" in there, it should be assigned to something inside the style attribute, also you got all you apices wrong, but that may be due to copy pasting the code.

    It should look something like this:

    <progress
     value="80"
     max="100"
     style="width: 60%; background: '&ShapeName.Fill&'; height: 10px"
     ></progress>
    I didn't include the red color because I don't know what exactly you want to do with it


    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!
  • Kiruthika22 Profile Picture
    61 on at

    Hi @msabau ,

    Thanks for your reply.

    I didnt notice the red one..I dont need that actually.

    Now i changed the code to below..It is not throwing error still the color is not changing accordingly.

    "<progress
    value=""80""
    max=""100""
    style=""width: 60%; background: '&ShapeName.Fill&'; height: 10px""
    ></progress>"

  • msabau Profile Picture
    270 on at

    I'm not entirely sure how Power Apps works with HTML. I don't know whether it can change values dynamically. Normally to do that, you'd use JS or CSS in some cases, but you can't really do that here. Also your value is fixed, not dynamic, so you'd have to find a way to change dynamically somehow.

    I hope you'll receiver an answer from someone with more knowledge on the matter soon



    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard