web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Applying Hyperlink to ...
Power Apps
Answered

Applying Hyperlink to Gallery Label

(1) ShareShare
ReportReport
Posted on by

Hello,

 

I am trying to figure out how to apply a different hyperlink for every item within a given gallery? Ideally the title of the gallery item would be dynamically inserted into the link being searched to locate a specific document.

 

Any guidance would be greatly appreciated.

 

Thank you!

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    If you have the hyperlink on each item of your data source, then you can certainly do that. I can think of two ways how you can implement this. One way is to use the Launch function in the OnSelect property of your label, and when someone clicks it, you launch the URL that is associated with the item; you may want to make the label to look like a link if you want. Another way is to use an HtmlText control, on which you can define the text that you want to show as a HTML link (<a...>) tag, composing the html text to use both the text you want to display and the URL you want to link. The app below shows both alternatives:

     

    ForumThread458401.gif

     

    I'm also attaching the app shown below. To open it, save it locally, then go to https://create.powerapps.com, then select Open, Browse, and find the app that you saved.

    Hope this helps!

  • Community Power Platform Member Profile Picture
    on at

    @CarlosFigueira 

    This is very helpful, thank you!

     

    If the data is updated to include additional entries, is there a way to edit links based on a formula for new entries or is this outside the scope of powerapps' functionality? Perhaps you can advise an alternate method of doing something like this. 

     

    Once again, thank you for your help

  • CarlosFigueira Profile Picture
    on at

    If you can compose the link based on some information that is already in the record, then you may be able to use a formula for that. For example, if the item has an id, and the link uses that id, you can use something like Concatenate("https://my.company.com/items/", id) to create the link.

    If that is not the case, then you will have to add an additional column to your data source to create the link, and you can edit it in PowerApps itself - for example, if you are using an edit form, you can add this new field in the form.

    Hope this helps!

  • tauseefmsk Profile Picture
    12 on at

    You can even use a Button control. How this works is:

    1. You have a single line of text called "url" in SharePoint list to store the URL.
    2. Use a button control in the Gallery.
      • Set "OnSelect" property of button to "Launch(thisItem.url)"
        tauseefmsk_0-1639750985899.png
      • Set the "Visible" property of button to "If(IsBlank(ThisItem.url),false,true)"
        tauseefmsk_1-1639751089926.png

        The visible property will show button only in record where the url is present and is hidden for records where url is absent as shown below

        image.png

    I hope this Solution helps. Happy PowerApping 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard