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 / Dynamic images on Para...
Power Apps
Unanswered

Dynamic images on Parameter

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi fellow developers,

 

We're trying to create a app that shows an image based on a parameter.

 

The only issue is that we update the image location with: UpdateContext

That writes the parameter to the Image as text but not as a Image data type. So it doesn't show the correct picture.

The images have the same name as the parameters that should work correctly.

 

Is there a way to have dynamic images based on function loaded parameters?

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Where is the pictures stored? Are you using URL of the images as the variable? Please share the formula that you use to create the variable and how did you set the Image property.

     

    Regards,

    Mona

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-monli-msft ,

     

    The pictures are stored in the media library of the app itself. hence we could use " 'filename' ".

    We can't set the Image property thats why its not working..

     

    I'll provide screenshots in the attachments.

     

    In the screenshot you can see how we're addressing the image variable to be the same as the UPN.

    and how the Image name is the same as my upn.

     

    We can also see that the upn is written correctly to the variable and then reused in the image itself but as text and not as a Image data type. Thats why it is not working. I would like to know if there is another way of doing this.

     

    Thanks alot for looking into this.

    Annotation 2019-12-27 093828.png
    Annotation 2019-12-27 093813.png
    Annotation 2019-12-27 093807.png
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Yes it is very much possible.

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Hi @Anonymous  - although we are somewhat unsure of your specific scenario, we believe you might be running into the fact that you cannot just simply use the image name text to reference the image in PowerApps. Instead you need to have an actual copy of an Image Control with the image displayed in a hidden Master Screen of some sort (a screen that the app user never sees). Then you need to have something like a collection which stores the reference to the Master Screen controls with the images on them. When you have the button pressed or whatever changes it, you then must reference and retrieve the correct index of the Collection for the actual Image control you want to be Dynamic. This would be one approach. You can also use a bunch of nested conditions in the Image parameter of the actual Image control you want to be dynamic as well and reference the hidden master images explicitly in the conditions if you have only 2 or 3 images but it may become daunting to maintain the conditions if you have too many images. Hope this helps. 

     

    P.S- we can't guarantee this above is your answer and also, the above is just a high level general summary of what you might need to do.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard