cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mr-dang
Community Champion
Community Champion

Bug: local Image reference in galleries

You can reference a local image file that has been added to the app using a text reference:

 

"appres://resources/" & "[image name here]"

Normally you would need to directly reference a local image by its filename. The method above allows you to reference the image using a text command. This is a good option if you have the name of the picture stored in a table, the images stored locally within the app, and you want to bind that table to a gallery.

 

The text method works fine in individual image boxes. It works inside galleries while you are editing as well--it just doesn't work with the app opened in cloud mode.

 

Below is a screenshot of 3 different ways I tried referencing the picture as well as two galleries using the text method.

 

2017-12-28 (2).png

 2017-12-28 (1).png

 

In that second screenshot, the individual image boxes come out okay, but none of the images showed up in the galleries which is why they appear black and empty.

 

I considered that it was a problem with the gallery itself. So I created a Radio control to switch between references for local images and online images. The local images still did not work with the text references, and the online images worked as expected. 

 

powerapps local image.png

 

 

Overall, this is a low priority issue for me since I store my images online anyway and text works great inside galleries when referencing a picture's URL.

 

Just putting this out there.

Microsoft Employee
@8bitclassroom
1 ACCEPTED SOLUTION

Accepted Solutions

"appres:" uri's are internal to the PowerApps platform and should not be used directly, as their behavior is undefined. Depending on the deployment of the app, these uri's are generated differently, as you've found out above.

 

Instead, you should refer to the resource by it's name directly (not as a string). Each resource is given its own unique name in the app, just like controls. If you need a mapping, use a Collection to do this followed by a lookup if the image is dependent on some other output.

View solution in original post

4 REPLIES 4
v-micsh-msft
Community Support
Community Support

Hi @mr-dang,

 

Thanks for the feedback.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

"appres:" uri's are internal to the PowerApps platform and should not be used directly, as their behavior is undefined. Depending on the deployment of the app, these uri's are generated differently, as you've found out above.

 

Instead, you should refer to the resource by it's name directly (not as a string). Each resource is given its own unique name in the app, just like controls. If you need a mapping, use a Collection to do this followed by a lookup if the image is dependent on some other output.

mr-dang
Community Champion
Community Champion

@joem, thank you for clarifying that. A table or collection makes sense. 

Microsoft Employee
@8bitclassroom
rebeccas
Community Champion
Community Champion

Is there any way to convert the "appres"  either in PowerApps or in Flow where it can be saved as a jpg or pdf?

 

Specifically I am trying to for the use of the Pen Inut. I can make it display fine within PowerApps and I also know how to make the Pen Input email but I would like to be able to save it as a file type that can be retrieved easily outside of powerapps for various reasons. 

 

I have one that when an item is created it generates a pdf and then saves that pdf as an attachment on that specific sharepoint list and I would like to do something similar for this, but on the other I did it in HTML code and because of the way my data is pulling (from multiple SP List) this would be better in Excel or Word. To pull the data in those correctly is not an issue...it is the signature I am struggling with. Flow is really my top choice on achieving this but I have not had any luck yet.

 

Any ideas?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,968)