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 / If hyperlink exists co...
Power Apps
Answered

If hyperlink exists condition

(0) ShareShare
ReportReport
Posted on by 776

Hi Expert,

 

I am sure this would be simple but I am not able to figure it out (new to powerapps)

 

I am using a form to display data from sharepoint

 

one of the field in sharepoint will have a hyperlink in it

 

My condition is that the text box in form should show the hyperlink if available if not then show 'NA'

 

AshishJaiswal_0-1634744638119.png

 

Categories:
I have the same question (0)
  • Gorilla_8 Profile Picture
    on at

    @AshishJaiswal 

     

    Try:

    If(!IsBlank(Yourlink), Showthelink, "NA")
    

    OnVisible this code 

  • AshishJaiswal Profile Picture
    776 on at

    @Gorilla_8 

    I am using this in the htmltext box - but it is not working

    Value should be valided from datacardvalue43.text

     

    If(!IsBlank(DataCardValue43.Text),"<a href=" & DataCardValue53.Text & ">Click here</a>","NA")

     

  • Verified answer
    Gorilla_8 Profile Picture
    on at

    @AshishJaiswal 

     

    Try more simple

     

    Put a HTML Text and put this code:

    "<a href=" & DataCardValue53.Text & ">Click here</a>"

     

    And on the OnVisible property:

    If(!IsBlank(Yourhtml.Text),true,false)
  • Gorilla_8 Profile Picture
    on at

    @AshishJaiswal 

     

    Or you can try:

    OnVisible

     

    If(!IsBlank(DataCardValue43), true, false)

     

     

    And on the Text

     

    If(!IsBlank(DataCardValue43.Text),"<a href=" & DataCardValue53.Text & ">Click here</a>","NA")

     

  • timl Profile Picture
    36,731 Super User 2026 Season 1 on at

    Hi @AshishJaiswal 

    Can you clarify what's not working? Is it the case that the link appears correctly but isn't clickable?

    If so, one thing to check is that the DisplayMode of the card that contains your HTML text control is set to Edit.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Launch-Function-not-working-inside-a-DataCard/m-p/713941

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @AshishJaiswal :

    I've made a test but it worked well on my side:

    vbofengmsft_0-1634797552878.png

     

    vbofengmsft_1-1634797575817.png

    vbofengmsft_2-1634797592419.png

    vbofengmsft_3-1634797597131.png

    Could you describe the problem you encountered in detail?

    Could you please tell me what he meaning of available is?(My condition is that the text box in form should show the hyperlink if available if not then show 'NA')

    What are the specific conditions of NA you want to show? Do you need to verify if the value of datacardvalue43.text is in URL format?

    Best Regards,

    Bof

     

  • AshishJaiswal Profile Picture
    776 on at

    HTML Text 

    "<a href=" & DataCardValue53.Text & ">Click here</a>"

    and visible property as 

     

    If(!IsBlank(Yourhtml.Text),true,false)

    But it is not showing 'NA'

     

    I tried below 

    Visible - 

    If(!IsBlank(DataCardValue43), true, false)

     and text as 

    If(!IsBlank(DataCardValue43.Text),"<a href=" & DataCardValue53.Text & ">Click here</a>","NA")

     

    This does not work - it shows 'click here for all' - regardless if the value is present or not

     

     

    My understand is that

     

    We shouldn't be playing with the visible property as if link available t will show the link if not available it will show 'NA'. - in both scenario visible property should be true.

    Now about the text property i tried this 

    If(IsBlank(DataCardValue43.Text),"<a href=" & DataCardValue53.Text & ">Click here</a>","NA")

    But it is not working

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @AshishJaiswal :

    This has nothing to do with the visibility of the control, it only depends on whether the judgment condition in the If statement is true.for example:

    Even if DataCardValue43 is not visible, if the value of DataCardValue43.Text is not empty, the value of IsBlank(DataCardValue43.Text) is still false.

    In the final analysis, what conditions do you want to show "NA" when met, can you specify? For example:
    DataCardValue43 is not visible or the value of DataCardValue53.Text is empty.

    If you need to determine whether the visibility of DataCardValue43 and the value of DataCardValue53 are empty at the same time, then you can try:

    If(IsBlank(DataCardValue43.Text)||IsBlank(DataCardValue53.Text),"<a href=" & DataCardValue53.Text & ">Click here</a>","NA")

     Best Regards,

    Bof

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard