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 / icon controls - how to...
Power Apps
Answered

icon controls - how to change icon image

(0) ShareShare
ReportReport
Posted on by

I'm wanting to change an icon image from "Edit" to "Save", I'm using a variable to store value and assigning the variable to the icon property.

Changeicon.Onselect = Set(varChangeIcon, "Save");Set(varChangeTooltip, "Save")

Reseticon.Onselect = Set(varChangeIcon, "Edit");Set(varChangeTooltip, "Edit")

Icon.icon = varChangeIcon

Icon.Tooltip = varChangeTooltip

icon_1.PNG

When I run this, only the Text to display while hoovering is working, the image is blank but the function within the icon.OnSelect works. Can this be done? changing the image?

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @nvpc 

    Can you please try this code instead and let me know the result?  Your code changes the Icon property to text data type but we need to change it to a enum value instead (e.g Icon.Save is an enum).

     

    Icon.icon = Switch(varChangeIcon,"Save",Icon.Save,"Edit,Icon.Edit)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • nvpc Profile Picture
    on at

    Thank you, your were missing a closing quote but it worked!!! can you explain the difference?

    Switch(varChangeIcon,"Save",Icon.Save,"Edit",Icon.Edit)

  • mdevaney Profile Picture
    29,991 Moderator on at

    @nvpc 

    Yes.  Your solution put the value "Save" in the Icon property.  Save is a text string.  My solution put Icon.Save in the Icon property.  Icon.Save is a reference to the Save image.  That's why it did not work initially.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard