cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ashok2
Level: Powered On

Gallery Label as a Hyperlink powerapps

I have gallery where there is label to respresent splist data on label onselect i have written a formula , but label is not like hyperlink , how can i create label as hyperlink and on click of link it should use below formula

 

It working fine with label as text but it is not like hyperlink which is not user friendlyu

 

Set(VarReq,1);ClearCollect(Collectione,e);ClearCollect(Collections,S);If((Status.Value="Draft" ),UpdateContext({varStatus: 0 }));If((Status.Value="approved"),UpdateContext({varStatus: 1 }));Navigate(Page,ScreenTransition.Fade,{SelectedGalleryVar:Gallery_1.Selected.'ID',varStatus: varStatus});

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Gallery Label as a Hyperlink powerapps

@Ashok2 

Have you tried adding it to the end of the formula like this?

Set(VarReq,1);ClearCollect(Collectione,e);ClearCollect(Collections,S);If((Status.Value="Draft" ),UpdateContext({varStatus: 0 }));If((Status.Value="approved"),UpdateContext({varStatus: 1 }));Navigate(Page,ScreenTransition.Fade,{SelectedGalleryVar:Gallery_1.Selected.'ID',varStatus: varStatus}); Launch("https://www.google.com");

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Gallery Label as a Hyperlink powerapps

@Ashok2 

A label can be used as a hyperlink by placing code like this in the OnSelect property.

Launch("https://www.google.com")

 

If the text "www.google.com" appears in the label's text you can use this code instead.

Launch("https://" & Label1.Text)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Ashok2
Level: Powered On

Re: Gallery Label as a Hyperlink powerapps

Inside launch how can I insert forumla
Super User
Super User

Re: Gallery Label as a Hyperlink powerapps

@Ashok2 

Have you tried adding it to the end of the formula like this?

Set(VarReq,1);ClearCollect(Collectione,e);ClearCollect(Collections,S);If((Status.Value="Draft" ),UpdateContext({varStatus: 0 }));If((Status.Value="approved"),UpdateContext({varStatus: 1 }));Navigate(Page,ScreenTransition.Fade,{SelectedGalleryVar:Gallery_1.Selected.'ID',varStatus: varStatus}); Launch("https://www.google.com");

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Microsoft v-siky-msft
Microsoft

Re: Gallery Label as a Hyperlink powerapps

@Ashok2 

 

Could you share more details and screenshots of label? Does the label show the website link?

If so you can set OnSelect of label: Launch(Label.Text)

Sik

Ashok2
Level: Powered On

Re: Gallery Label as a Hyperlink powerapps

I replace label with button however your solution as well worked fine
Super User
Super User

Re: Gallery Label as a Hyperlink powerapps

@Ashok2
Please mark the post that solved your problem as the solution.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
ChrisBar
Level: Powered On

Re: Gallery Label as a Hyperlink powerapps

How would you apply a different hyperlink for every item within the gallery? Ideally the title of the gallery item would be dynamically inserted into the link being searched to link the the document title associated with it but this functionality does not seem possible directly.

 

Any guidance would be greatly appreciated.

 

Thanks.

Super User
Super User

Re: Gallery Label as a Hyperlink powerapps

@ChrisBar 

Might be best to post this as a new question.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,959)