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

Announcements

News and Announcements icon
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 Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 833

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 383

Last 30 days Overall leaderboard