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 / Access icon properties...
Power Apps
Unanswered

Access icon properties using SharePoint value (same as the icon name)

(0) ShareShare
ReportReport
Posted on by 2

So, I'm building an desk reservation application. The requirement is to create a dynamic pin-point, to the desk which is selected, on the jpeg Floorplan.

I'm trying to set the value of that icons to true/false depending on what the value from SharePoint is available.

I'm planning to do this by setting the value of a global variable to the value of "pinNameForApp" which is pulled from the SharePoint. This value is exactly same to the name of that icon.

Say the name of icon is 'pinLW19', that value would be set for the global variable. 

 

Now I want to access this icon (of name pinLW19) and set it's Visible property to "true".

Is there a way to find the icon by its name, or access it some other way?

Attaching images for the icon, image and screen and for the SharePoint data. 

IMG_20201028_020409.jpg
IMG_20201028_020356.jpg
Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @imdsrs ,

    You cannot refer to Power Apps objects dynamically, however in your case, there may be a solution. If for instance you set varButton as a string as pinLW19, using a Lookup to the SP list

    UpdateContext(
     {
     varButton:
     LookUp(
     deskDetails,
     WhateverYourMatchIs
     ).pinNameForApp
     }
    )

    then the Visible property of this icon would be

    varButton="pinLW19"

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • imdsrs Profile Picture
    2 on at

    Thanks for the review and your comment.

    But there are multiple (~300) icons on the Floorplan. All would be false by default; the one whose name/value is fetched from the SP would turn True.

    How do a set a generic variable on each of the Icon's 'Visible'? 

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @imdsrs ,

    Exactly as I suggested - a statement that can only be true or false can be reflected directly in a control property that is also Boolean, so instead of 

    If(
     varButton="pinLW19",
     true,
     false
    )

    you can just put

    varButton="pinLW19"

    Just set the variable to the Lookup value and you will need to put the relevant name on each of the Icon's Visible properties.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @imdsrs ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard