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 / ฺBasic code not workin...
Power Apps
Answered

ฺBasic code not working [ Fill color ]

(0) ShareShare
ReportReport
Posted on by 7

Dear Sir, 

 

   I tries to create button to fill color in Icon but this command is not working when preview and click button.

 

How to solve this problem ? 

 

Thanks, PWA.PNG

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Cyberboon ,

     

    The key is that we cannot use = to assign values to control properties, but we can use variables to pass values.

     

    You could try:

     

    Set Icon4 ' s Fill property to :

     

     

    DefaultColor

     

     

     

    Set the button 's OnSelect property to:

     

     

    Set(DefaultColor,RGBA(255,0,0,1)

     

     

     

    Best Regards,

    Bof

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    On the OnSelect of the Button create a variable:

    Set(varColor,Red)

     

    Then in the fill property of the Icon;

    varColor

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard