cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Help with Flow expression

Hi there,

 

I'm trying to build an expression to evaluate rows in Flow but am getting nowhere and have no idea why. I'm trying to check if the length of an item is greater than 0, and if so, convert the value to a date, and if not, convert the value to blank.

 

Flow states that the expression is invalid but it all looks good to me.

 

Any ideas ??

 

Expression in question:

if(length('EDC')>0, formatDateTime(addDays('1899-12-30', int(item()?['EDC'])), 'yyyy-MM-dd'), '')

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @rapidjuice,

 

Please use the greater() function to compare the length and 0, so the final expression will be:

if(greater(length('EDC'),0), formatDateTime(addDays('1899-12-30', int(item()?['EDC'])), 'yyyy-MM-dd'), '')

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Hi @rapidjuice,

 

Please use the greater() function to compare the length and 0, so the final expression will be:

if(greater(length('EDC'),0), formatDateTime(addDays('1899-12-30', int(item()?['EDC'])), 'yyyy-MM-dd'), '')

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,609)