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 / Check Null condition u...
Power Automate
Unanswered

Check Null condition using power automate expression

(1) ShareShare
ReportReport
Posted on by 109

Hi,

I am retrieving records from one entity using a FetchXML query and then binding these values to another entity. Before binding, I need to verify if the value exists using a Power Automate expression.

If the value is blank, nothing should be passed; if the value exists, the specified value should be used..

Ex: outputs('GetLeadInfo')?['body/value'][0]['lastname']

 

Thanks,

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,968 Moderator on at

    Hello @Rahman1005 

     

    use a coalesce statement. in your example you would put

     

     

    coalesce(outputs('GetLeadInfo')?'body/value')?[0]?['lastname'],'')
    
    if the outputs is null or if [0] doesn't exist or if ['lastname'] doesnt exist it will not fail and give you the default value of ''
    
    or you can replace the '' with a default value or the expression Blank() or null or whatever you want

     

     

     

    P.S. you should put the ? before every property because if the property doesnt exist at all, it will cause expressions to fail, if its NOT ther e at all, as in the property doesn't exist on the object, it will just pass null instead of fail.

     

    Also for reference

    Blank, Coalesce, IsBlank, and IsEmpty functions - Power Platform | Microsoft Learn


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard