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 / Open Power Apps Popup ...
Power Apps
Suggested Answer

Open Power Apps Popup from Hyperlink Embedded in Rich Text/HTML Content

(1) ShareShare
ReportReport
Posted on by
    Has anyone implemented a solution where clicking a hyperlink rendered inside an HTML Text or Rich Text Viewer control opens a Canvas App popup/dialog instead of navigating to a URL? I also explored deep-linking, but I'm unsure whether it would provide a seamless in-app popup experience. I'm looking for suggestions on a Power Apps Canvas App design.
     
    Requirement
    When a user clicks a hyperlink within the criteria text:
    1. Open a popup/dialog within the Canvas App.
    2. Display the data mapped to the selected Criteria.
    3. Remain on the same screen.
     
    Challenge
    Criteria are displayed inside a Gallery. Hyperlink positions vary for each criteria. Content length is dynamic. Hyperlinks are embedded within the criteria content itself. Each Criteria can have different hyperlinks. Using a fixed overlay button/icon is difficult because the hyperlink location changes from record to record. HTML Text/Rich Text Viewer hyperlinks seem to support URL navigation only and do not appear to trigger Power Fx actions.
     
    Any suggestions or alternative approaches would be appreciated.
     
    Thanks!
     

       
    Categories:
    • Suggested answer
      11manish Profile Picture
      4,792 Super User 2026 Season 2 on at
      I would redesign this as a structured, data-driven Criteria renderer using native Canvas Link controls + a popup container. It is more reliable, maintainable, accessible, and scalable than trying to make an HTML hyperlink invoke Power Fx. The fact that hyperlink positions and text lengths are dynamic is not a blocker once the content is represented as separate text/link elements.
    • Suggested answer
      Mohsin Ali Profile Picture
      1,041 on at
      Hello @RC-10091206-0 - The HTML Text/Rich Text Viewer control cannot directly execute a Power Fx action when an embedded hyperlink is clicked; it is primarily treated as URL navigation.
       
      For this requirement, I would recommend rendering the criteria content as structured data instead of a single HTML block. Separate the normal text and clickable items, use native Power Apps controls such as Link/Button, and on OnSelect set the selected criteria and show a popup/container on the same screen.
       
      This will also handle dynamic criteria and different hyperlink positions more reliably.
       

    • Suggested answer
      WarrenBelz Profile Picture
      156,566 Most Valuable Professional on at
      Firstly a deep link URL will either open in a new window or overwrite the one you have, so that is not the solution. Assuming you do not want the link to flow with other text, you can simulate one with a Text Label (Colour Blue and underline), which can have dynamic content - I suggest a Variable (varPopup used here), so the OnSelect of the Label would be something like
      Switch(
         varPopup,
         "Text1",
         Code1,
         "Text2",
         Code2,
         .....
      )
      with the Text of the Label varPopup. so depending on your Variable value, you would run whatever code was required.
       
      Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
      Visit my blog
      Practical Power Apps    LinkedIn  
    • Suggested answer
      M Bilal Khan Profile Picture
      376 on at
      Hi @RC-10091206-0,

      The main limitation is with the HTML Text control itself: hyperlinks inside the HtmlText property don't trigger the control's OnSelect formula. Microsoft documents this explicitly, so there isn't a supported way to attach Set()/UpdateContext() directly to an <a> element embedded in the HTML.

      For this scenario, I would use a data-driven Canvas App pattern instead of relying on the hyperlink inside the HTML.

      For example, keep the criteria text and the linked criteria/action as separate data:

      CriteriaText
      CriteriaId
      LinkText
      LinkType
      

      Then render the normal criteria text and place a Power Apps Link or Text control over/alongside the link area. Its OnSelect can set the selected record and show a popup:

      Set(varSelectedCriteria, ThisItem);
      Set(varShowCriteriaPopup, true)
      

      Popup/container:

      Visible = varShowCriteriaPopup
      

      Close button:

      Set(varShowCriteriaPopup, false)
      

      The popup can then display:

      varSelectedCriteria.CriteriaText
      

      or whatever fields belong to that Criteria record.

      If the hyperlink must remain embedded at arbitrary positions inside long/dynamic HTML, I would consider changing the rendering model rather than trying to calculate the hyperlink's position. For example, store the criteria as structured content and render the text/link portions as separate controls inside a flexible container.

      Deep linking is useful when the requirement is to open a Canvas App or navigate to a particular screen/record, because Power Apps supports query parameters through Param(). It doesn't provide an in-place popup mechanism inside the currently running Canvas App.

      So for the requirement:

      Click link → stay on same screen → open popup → show selected Criteria data

      I would use:

      Gallery item
          ↓
      Criteria / Link control
          ↓
      Set(varSelectedCriteria, ThisItem)
      Set(varShowCriteriaPopup, true)
          ↓
      Popup Container
          ↓
      Selected Criteria details
      

      If the content truly has arbitrary hyperlinks embedded within dynamic HTML, there isn't a clean supported way to make those individual <a> elements directly execute Power Fx. In that case, restructuring the content into separate clickable Canvas controls is the more maintainable approach.

    • WarrenBelz Profile Picture
      156,566 Most Valuable Professional on at
      A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
       
      Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
      Visit my blog
      Practical Power Apps    LinkedIn   

    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

    Season of Sharing Community Challenge Winners!

    Congratulations to our community stars!

    Kudos to our 2025 Community Spotlight Honorees

    Expanding mentorship, skilling, and AI innovation

    Leaderboard > Power Apps

    #1
    11manish Profile Picture

    11manish 397 Super User 2026 Season 2

    #2
    Mohsin Ali Profile Picture

    Mohsin Ali 354

    #3
    WarrenBelz Profile Picture

    WarrenBelz 232 Most Valuable Professional

    Last 30 days Overall leaderboard