web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dealing with null value.
Power Automate
Unanswered

Dealing with null value.

(0) ShareShare
ReportReport
Posted on by

Hi Beautiful people,

I am building a flow with a SharePoint  list.

I have two field 1. teamLeaderDate and 2. managerDate both containing date in string type. 

The idea here is, if one contain data other does not but we never know which contains data and which does not contains.

In my flow I have to check which field contains data and apply a conditional check on the data to send an email notification.

I have used following condition to check if the item is empty

lohaninarayan_2-1652937996649.png

 

If the condition meet

lohaninarayan_1-1652937904712.png

The idea I am using is if the managerDate is empty use the teamLeaderDate but after applying the first condition it is giving me an error of providing null value on second condition even though the data I have supplied on second condition have date value in it.

When I change first condition to something else the second condition does not throw an error but when I have this condition it throw an error of having null value.

Any help or suggestion will be appreciated.

Thanks

Narayan 

 

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @lohaninarayan 

     

    You could remove the first condition and just use the expression coalesce(). It takes a list of values and returns the first non null. So, in order of preference, insert your two dates and if the first is null the 2nd will be returned. You could also have a third date if needed should both be null, like a default of utcnow().

     

    the coalesce would be inserted inside you adddays expression.

     


    Cheers
    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks.

  • lohaninarayan Profile Picture
    on at

    Hi DamoBird365

    Thanks for the suggestion. I am trying to use coalesce() on your suggestion. I am using like this

    lohaninarayan_0-1652999496158.png

    The code I have used is 

    coalesce(item()?['Investigation_TLCompleteDate'], ['Investigation_ManagerCloseOffDate'])
    But when I click on ok button it is giving me following error.
    lohaninarayan_1-1652999566736.png

    Please let me know if I am doing it incorrectly.

    Thank you again.

    Narayan

     

     

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @lohaninarayan 

     

    You need to provide valid expressions and all strings for all of the list options and you appear to be missing item()? on the 2nd expression.

     

    coalesce(item()?['Investigation_TLCompleteDate'], item()?['Investigation_ManagerCloseOffDate'])

     

    Damien

  • lohaninarayan Profile Picture
    on at

    Hi @DamoBird365 

    Thanks for the reply. I was able to fix my issue with the if() statement but I also checked with your suggestion and it worked. I think coalesce() is better than if() in my situation.

    Thanks again. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard