cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

How to Open Image in Another Tab or Window

I have a gallery that populates certs and quals data as well as a image (.jpg) control of the specific cert or qual.

 

A request was made to be able to open the cert or qual document in another tab of window when clicking on the Image or button in the Gallery. The data is coming from CertQualCollection and the image is coming from CQImageCollection.

 

Image property = 

First(Filter(CQImageCollection,Name=ThisItem.CQYr&" "&ThisItem.Title&" "&ThisItem.CQTitle&" "&ThisItem.FrstNm&" "&ThisItem.LstNm&" "&ThisItem.AcrdtnAgncy)).'{Link}' & First(Filter(CQImageCollection,Name=ThisItem.CQYr&" "&ThisItem.Title&" "&ThisItem.CQTitle&" "&ThisItem.FrstNm&" "&ThisItem.LstNm)).'{Link}'

 

Is it possible to set the Image control 'OnSelect' property or the Button 'OnSelect' so that it opens the image displayed in the Gallery in another tab or window?

 

3csman_0-1610131689526.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User III
Super User III

@3csman 

That's not the formula I provided you.  Please use the following formula - you can copy and paste:

With({ThisItem: EditCQDetailsGallery.Selected},
    LookUp(CQImageCollection,
        Name=ThisItem.CQYr & " " & ThisItem.Title & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " " & ThisItem.AcrdtnAgncy
).'{Link}'
    )
)

 

Also, you can't provide two links to a Image property.  So, I am not sure how you had that working to start with, but I assure you it was a fluke.  You need to provide one.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

RandyHayes
Super User III
Super User III

@3csman 

All you needed was to put an image control into your other screen (Insert->Media->Image) and set the image properties as provided.  Images certainly don't need galleries to work!

 

As for printing...the best you could do is open the image in a browser and from there download or print.  To do so (since you are using the link to the image for the image) you can set the OnSelect action of the image to : Launch(Self.Image)

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

15 REPLIES 15
RandyHayes
Super User III
Super User III

@3csman 

Sure, just put the image control on another screen or under another tab and then in your button, navigate to that screen, or activate the other tab.

 

Change your formula to the following:

With({ThisItem: YourGalleryName.Selected},
    LookUp(CQImageCollection,
        Name=ThisItem.CQYr & " " & ThisItem.Title & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " " & ThisItem.AcrdtnAgncy
).'{Link}'
    )
)

By the way...I am not sure why you have Two links being specified for the Image - the above will return one link??

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
3csman
Impactful Individual
Impactful Individual

The two links is because on upload the document can be formatted in one of two ways, and the image retrieval needs to be able to find both.

 

I tried this; it errored.

3csman_0-1610134287857.png

 

Also, here is an image of the CQCollection, in case that helps.

3csman_1-1610135011612.png

 

RandyHayes
Super User III
Super User III

@3csman 

That's not the formula I provided you.  Please use the following formula - you can copy and paste:

With({ThisItem: EditCQDetailsGallery.Selected},
    LookUp(CQImageCollection,
        Name=ThisItem.CQYr & " " & ThisItem.Title & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " " & ThisItem.AcrdtnAgncy
).'{Link}'
    )
)

 

Also, you can't provide two links to a Image property.  So, I am not sure how you had that working to start with, but I assure you it was a fluke.  You need to provide one.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3csman
Impactful Individual
Impactful Individual

I actually just copied the entire gallery over to a blank screen and increased the image size, and created the navigation button redirect.👍

RandyHayes
Super User III
Super User III

@3csman 

Well, that's one way to go about it, but now you'll have a bunch of extra things that you don't need.  All you need is the image control.

And if you just copied, you're going to have problems with that double link part.  Maybe not now, but I'll be waiting for the post where this fails for you in play mode 🤗

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
3csman
Impactful Individual
Impactful Individual

Any recommendations on how to create a print button for the image displayed? 

RandyHayes
Super User III
Super User III

@3csman 

There is no ability to print from PowerApps!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
3csman
Impactful Individual
Impactful Individual

Oh you of little faith.

 

How about download instead of print?

3csman
Impactful Individual
Impactful Individual

The image control was in the Gallery. When I just copy the image control and drop it on a blank screen I get an error because the data source (the hosting Gallery) is missing. Not sure how to make it work without the Gallery.

 

As for the extras I just made everything else Visible, false. I guess I could also delete those fields as long as I redirect the image links back to the old Gallery...maybe.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (62,590)