cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phineas
Post Prodigy
Post Prodigy

How to Launch Image Temporarily Stored in Collection

I have a Camera control. I have Gallery. I have a Collection.

 

The image is stored in the Collection and recalled to the Gallery. I need the ability to 'Launch' the image when the image is clicked on to review the image before proceeding.

 

I can't seem to get the formula right. I've tried several configurations in the OnSelect of the Image control, including the following; none worked: 

        Launch(ThisItem.Value)

 

        First(ThisItem.'{Attachments}').Value

 

        Launch(FormImageGallery.Selected.Value)       

       

        Launch(FormImageGallery.Selected.FormImage.Image)

 

Phineas_0-1650409172320.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User
Super User

@Phineas ,

You cannot Launch it as the command refers to "external" items accessible via a URL (your image is still in the image control or collection). You can however make a full screen Image Control Visible on a Variable with 

First(ThisItem.'{Attachments}').Value

or if in a Gallery

GalleryName.Selected.Value

and you will be able to review the picture.

 

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

View solution in original post

@Phineas ,

You need  ThisItem.Value for the item in the gallery. I have a blog on this (section is here).
For the full-screen, just make an image control the size of the screen, with the Visible  as a Variable ( I have used varShow, but call it whatever you want), then on the OnSelect of the image in the gallery

UpdateContext({varShow: true})

Also put an X icon in one top corner, also with the Visible of varShow and the OnSelect

UpdateContext({varShow: false})

Finally the Image of this large control would be

YourGalleryName.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

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

@Phineas ,

You cannot Launch it as the command refers to "external" items accessible via a URL (your image is still in the image control or collection). You can however make a full screen Image Control Visible on a Variable with 

First(ThisItem.'{Attachments}').Value

or if in a Gallery

GalleryName.Selected.Value

and you will be able to review the picture.

 

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

Edited Segment: The error says - "The Function 'First' has some invalid arguments"

Phineas_0-1650473928578.png

*******************************************************************

Can you please clarify "You can however make a full screen image Control Visible on a Variable..."?

I can already see the images in a small version in the image control.

How would I apply your fix so that when I click on the image control the image opens in a large web view?

I tried to place language in the image control OnSelect.

And I've tried creating a button and using it to open the image. I can't seem to get it straight.

I want the images to continue to appear in the Gallery, and when the image or a button associated with the image is clicked the image open in a larger web view.

@Phineas ,

You need  ThisItem.Value for the item in the gallery. I have a blog on this (section is here).
For the full-screen, just make an image control the size of the screen, with the Visible  as a Variable ( I have used varShow, but call it whatever you want), then on the OnSelect of the image in the gallery

UpdateContext({varShow: true})

Also put an X icon in one top corner, also with the Visible of varShow and the OnSelect

UpdateContext({varShow: false})

Finally the Image of this large control would be

YourGalleryName.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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,257)