cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Condition not operating correctly

Hi all,

I'm building a flow which has a condition reliant on a date from excel. Snip is attached. When using the date formula in other flows it worked perfectly. But in the condition, all of the inputs come out as false. I have checked in other flows and my date is coming out of excel as the correct number, and the formula is producing the same number, so unsure as to what is going wrong. All help is appreciated, thanks a million.

jcoughlan_0-1594634008788.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi!

Then the issue is probably a data mismatch. So your addDays() expression output is of type integer, but the Excel column is of type string. Try to cast your excel column, by means of int()... or cast your addDays() output by means of string()

Hope this helps

 

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

6 REPLIES 6
efialttes
Super User
Super User

Hi!

My suggestion is to add a dummy Compose action block inside your 'Apply to each', just before the 'Condition' action block, and assign as its input 'Start date' dynamic content from excel. Now you can inspect easily its content.

My guessing is that your 'Start Date' Excel column has Date format, if so, it is stored internally as an integer. If this is the case, you will find the way to proceed here:

https://www.bythedevs.com/post/working-with-date-time-data-of-excel-in-power-automate

If not the case, please share 'Start date' content and the WDL expression also

 

Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Anonymous
Not applicable

Hi @efialttes 

I appreciate your help with this.

As you can see below, the date matches the output of the formula.

But when I put them into a condition it comes back as failed.

Can you think of any reason as to why this is happening?

jcoughlan_0-1594636827898.png

jcoughlan_1-1594636972934.png

 

 

Hi!

Then the issue is probably a data mismatch. So your addDays() expression output is of type integer, but the Excel column is of type string. Try to cast your excel column, by means of int()... or cast your addDays() output by means of string()

Hope this helps

 

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Anonymous
Not applicable

Hi @efialttes 

Thank you for your help and I appreciate the suggestion.

I have used the get a row function on several different flows using the same data and formula.

It has worked fine for me in these flows.

However, I need to use list rows present for this flow.

Would using the list rows present function have changed anything?

If not could you write the expression for me to fix this error

Finally solved, right? If so...

Congrats!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Anonymous
Not applicable

Yes, thanks so much😁

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,499)