cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powaya
Helper I
Helper I

How to I open an image attachment within my Power App without launching it into a browser window?

I have a simple Power App that I'm using to view image attachments from a Sharepoint list. The OnSelect code for the image thumbnail you see in the screenshot below is the following: 

 

Launch(ThisItem.AbsoluteUri)

 

That works great if I'm using the Power App in a browser, but when I'm using the mobile version of the app, I want to view the image attachment without going into a browser window. I tried using .Value instead of .AbsoluteUri and that didn't work. What's the easiest way to view the full sized version of the image without leaving the app?

 

BeckTableGalleryImageThumbnail.jpg

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @powaya ,

One option is to have a full-screen Image control set to be visible on a Variable (you will also need an exit icon on top of it setting the Variable to false to hide it), then have the Image property

First(GalleryName.Selected.Attachments).Value

 

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.

Visit my blog Practical Power Apps

powaya
Helper I
Helper I

@WarrenBelz  That full screen with the exit icon idea worked great, but using your code it only displays the first image in the gallery. What if the the gallery has many images and the user wants to see the 7th image, for example? How can I make your Image property code more dynamic so that it can open up the specific photo that the user selects?

Hi @powaya ,

Are the Items of your Gallery the actual attachments for one item, or a list of items with the first attachment shown?

If the first, you just need (the second is my original code)

GalleryName.Selected.Value

 

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.

Visit my blog Practical Power Apps

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,587)