I have a flow that is reading all rows from an Excel table. If a specific date field is empty, I would like to perform one action and if not, perform another action. I have tried numerous things and am getting the same result. My test table has 8 rows, 4 have data in the date field, 4 do not. So within Apply to each 2, from a Condition step, I have tried:
- checking the field for null
- checking the field for nothing (leaving the left part of the condition empty)
- setting a variable with the value of the date field and checking that for null or nothing
- using empty = true
- checking the length = 0
Solved! Go to Solution.
Hi @tverticchio
It could be there are spaces there hence its not evaluating it. Try using a trim() expression for that field then check for length() or empty().
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogShould be simply a condition based on Datefield is equal to null - Use the expression box to add the null or just type null
Another way is to initialise a string variable
Then set the variable to be the email column. This will put it in an apply to each
Create your condition based on the string var. now that it is a string you should be able to base the condition putting nothing in the is equal to Eg Stringvar is equal to
or
length(stringvar) is equal to 0
I have tried setting a variable and using that. The condition always evaluates to false.
Thank you for quick reply. However, I have tried simply using the date field in the condition. Tried to compare to null (function) as well as nothing. Always evaluates to false.
When you run the flow what does the variable show?
I have an excel sheet that looks at an email column. In this case the email can have many variable outcomes from user input. So I set a variable to have the email and the add a compose with the following expression. If the email is invalid it will return false. I set the condition to be based on that. my variable in this is called getemail
Variable returns a value or spaces. See below. Either way the condition returns false...
Should I be looking at something else?
Hi @tverticchio
It could be there are spaces there hence its not evaluating it. Try using a trim() expression for that field then check for length() or empty().
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogTrim function did the trick. Thank you!