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 / How to either return t...
Power Automate
Answered

How to either return the value of a colum or return a specific text if empty?

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a simple Flow that pulls together a number of colums from a SharePoint list and puts them into a HTML table which gets emailed.  The issue I am hitting is one of these columns is a "choice" column and if the a user creates an item and doesn't select a choice from the list the Flow fails because the column doesn't contain anything.

 

 

What I am trying to achieve is if the column contains a value then that value is written to the HTML table, or if there is no value the Flow updates the HTML table with "Not Set" text.

 

 

Any help gratefully received.

 

Rob

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I've come across null values myself lately. They can be frustrating. You can always check for a null value in a column with this formula to check for empty value: @empty(triggerBody()?['Name_Column/Variable']

     

    To acheive what you want to do you need an if formula that checks if the column is empty. If the column is empty (evaluates to true) you can use a replace function. If the condition evaluates to false you do nothing.

     

    Formula (I didn't fully test this, but can you try this)?

     

    if(@empty(triggerBody()?['Name_Column/Variable'],replace(['Name_Column/Variable'],'Not Set'),'')

     

     

  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Rob_CTL,

     

    I have made a test on my side and have create a "status" column with type "choice" in the sharepoint list.

     

    The screenshot of the sharepoint list as below:

    Capture.PNG

     

    You could refer to screenshot below to create the flow:

    Capture.PNG

     

    Th expression for the status column as below:

    if(empty(item()?['status']?['Value']),'Not Set',item()?['status']?['Value'])

    The flow would run successsfully as below:

    Capture.PNG

     

     

    Best regards,

    Alice

     

     

  • Rob_CTL Profile Picture
    on at

    Thanks @v-yuazh-msft and @Anonymous for the help, that worked perfectly!

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
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard