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 / Compose doesn't work i...
Power Automate
Unanswered

Compose doesn't work if date column it blank

(0) ShareShare
ReportReport
Posted on by

I'm using get items to interrogate a list, in which the items have 6 date of birth columns.

 

Problem is, it works fine if there's a date of birth in DOB column 1, but if DOB Column 2 is empty it fails

 

formatDateTime(outputs('DOB1'),'dd/MM/yyyy')
formatDateTime(outputs('DOB2'),'dd/MM/yyyy')
 

LukeSykes_0-1697661983188.png

 

Any help would be grately appreciated 

Categories:
I have the same question (0)
  • abouchaalaBAIT Profile Picture
    932 Moderator on at

    Hi, you can add a condition if the value is empty

    Should look like this : 

    if(empty(outputs('DOB2'),'', formatDateTime(outputs('DOB2'),'dd/MM/yyyy'))

    ----------------------------------------------------------
    If I have answered your question, please mark your post as Solved. 🆗✔️
    If you like my response, please give it a Thumbs Up. 👍
    You can accept more than one post as a solution.
     

  • LukeSykes Profile Picture
    on at

    This looks great however it's telling me it's an invalid expression....

  • abouchaalaBAIT Profile Picture
    932 Moderator on at

    I think i forgot a parentheses

    if(empty(outputs('DOB2')),'', formatDateTime(outputs('DOB2'),'dd/MM/yyyy'))

  • LukeSykes Profile Picture
    on at

    Thanks for your help on this - however i'm still encountering problems

     

    LukeSykes_0-1697704866922.png

     

    The idea is, if the day and month of Today matches the day and month of the Date of birth column, send an email.

    (I know the Convert DOB1 is not today - i'm wanting it to pick out a test list item)

     

    LukeSykes_1-1697705072673.png

     

    Expressions in the condition:

    Outputs('Convert_DOB1') is equal to outputs('TodayConverted')

     

    and so on

     

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