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 / Newbie question: IF an...
Power Automate
Unanswered

Newbie question: IF and empty expression

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi 

 

Newbie user, need help with this expression:

 

if(empty(item()?['InvoiceRecipient.DisplayName'],' ',item()?['InvoiceRecipient.DisplayName']))

 

Have a SharePoint list with a column InvoiceRecipient.DisplayName

 

Need an expression to display a blank if that row in that column is empty and return the value if not empty. But it's either giving me an error or showing a blank even when there is a value. Anything wrong with expression?

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Anonymous ,

    you've got the closing ) for the empty expression at the end instead of after the value to check. And I think that to update an empty value to a people picker field you must use 'null' as the value:

    if(empty(item()?['InvoiceRecipient.DisplayName']),null,item()?['InvoiceRecipient.DisplayName'])

     

  • Bokaboi Profile Picture
    47 on at

    Hey,

    I'm also a bit of a newbie and though I'd jump on this tread as I'm having a similar issue.

    I have a Create HTML Table action in which I'm wanting to pull through a date of issue, and an expiry date. If the field is empty, I want to return "Missing".

     

    2022-10-11 15_24_08-Edit your flow _ Power Automate and 9 more pages - Work - Microsoft​ Edge.png

    Raw outs from filter array

     

    2022-10-11 15_15_19-Run History _ Power Automate and 10 more pages - Work - Microsoft​ Edge.png

     

    This is the code I'm trying which gets a red error message.

    if(empty(item()?['Field_3'])),'MISSING',item()?['Field_3'])

     

  • mmicsa Profile Picture
    40 on at

    Just in case someone stumbles across this like I did, here's how I resolved it in the end:

     

    if(contains(item(),'the item'), item()['the item'], '')

     

    Hope it helps someone.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 344 Super User 2026 Season 1

Last 30 days Overall leaderboard