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 / Add if statement to ex...
Power Automate
Answered

Add if statement to expression

(1) ShareShare
ReportReport
Posted on by 98
Hi all,
 
I have the following expression that shortens URL links for me. Source is a Sharepoint list:
concat('<a href="', item()?['xxx'], '">xxx</a>')
 
The expression pulls the URLS from a SharePoint list, converts them into HTML and finaly send it as a report via email.
 
Unfortunately, "xxx" entries are also made where no URL has been set in the Sharepoint list.
I would like to add an if statement that, if URLs are not set, gives a note such as "please hand in later" as non url, just as non-executable text.
 
How do I best proceed?
 
Regards
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    13,491 Super User 2026 Season 1 on at
    I would do the following if I am understanding what you need correctly:
    1. Add a string variable to your flow and set the default value to "please hand in later".
    2. Add a condition to your flow to check that the URL exists, if it does, on the yes side of the condition, set the variable to your expression.
    3. Then use the variable in your e-mail.
     
  • Verified answer
    Ellis Karim Profile Picture
    11,819 Super User 2026 Season 1 on at
    Hi vipfafen,
     
    If I have understood correctly, you could try the following expression in a compose action: 
     
    if(empty(item()?['xxx']), 'please hand in later', concat('<a href="', item()?['xxx'], '">xxx</a>'))
     
    Here's a demo flow:
     
     
     
    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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard