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 Automate / Hide an HREF Link if n...
Power Automate
Answered

Hide an HREF Link if no Data

(0) ShareShare
ReportReport
Posted on by

I have a table created in a Select Statement that is sent in an Email.  In the value field of the table, I am formatting as an href with an expression in the middle: <a href = item()?['Recap_x0020_Picture']>Pic</a>

Sometimes that field in SharePoint is left blank.  But the href tag will obviously show up regardless of whether there is data or not. I'm wanting to see if there is a way to leave that field in the table blank if there is no data, so as to not have users click on links that do not go anywhere. 

 

theBrianL_0-1626299343306.png

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    12,079 Super User 2026 Season 1 on at

    For the picture property, you want to use an expression.

    ekarim2020_1-1626306053989.png

    For value2 mapping above, the expression would be something like:

     

    if(empty(item()['Value']),'', concat('<a href="', item()['Value'], '">Pic</a>'))

     

    If the item()['Value'] is empty, return an empty string, else construct a HREF tag.

    Note: The concat function will return data for value2 looking like:

    ekarim2020_1-1626305884888.png

    However, it should be rendered correctly as HTML:

    ekarim2020_2-1626306275176.png

    Your expression would look similar to:

     

    if(empty(item()['Recap_x0020_Picture']),'', concat('<a href="', item()['Recap_x0020_Picture'], '">Pic</a>'))

     

     

    Ellis

     

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 Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard