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 / HTML Text If Statement
Power Apps
Unanswered

HTML Text If Statement

(0) ShareShare
ReportReport
Posted on by 254

I have two hyperlink columns in a SharePoint list, one for link to PW documents and one for link to SP documents.  I want to use the HTML text input on my app to display these links in a clickable format but I want to use some logic.

 

Ideally I'd like to show a clickable hyperlink to the PW documents and SP documents but only if those fields are not empty.

 

E.g. If SP Documents and PW Documents are not empty show two clickable hyperlinks in the html text - SP Files PW Files

If only PW Documents is not empty then show PW Files hyperlink or if only SP Documents is not empty show SP Files hyperlink

 

Hopefully that makes sense.

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, do you need to add a html text element / rich text input? this would be much easier with a gallery or table as if the Hyperlink value is empty it will show as blank. you can the change the OnSelect function to If(!IsBlank(ThisItem.Hyperlink),Launch(ThisItem.Hyperlink)) to navigate to the link, if it doesn't exist, nothing will happen. 

     

     

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Manc_Gurl :
    I've made a test for your reference:

    1\Here is my list

    vbofengmsft_0-1636701770247.png

    2\Add a gallery and set it's items property to:

    MancList

    3\Add a Html text control into the gallery and set it's HtmlText property to:

    If(!IsBlank(ThisItem.SP),"<a href="&ThisItem.SP & ">SP Files </a>")&" "&If(!IsBlank(ThisItem.PW),"<a href="&ThisItem.PW & ">PW Files</a>")

    vbofengmsft_1-1636701850781.png

    Best Regards,

    Bof

     

     

  • Manc_Gurl Profile Picture
    254 on at

    Thanks @v-bofeng-msft that was just what I needed!

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard