
Announcements
My flow works fine for the first row -
second row throwing an error
my flow -
my expressions are like so -
throwing an error above - 'The template language function 'less' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.
How can I deal with the null values here?
The quickest way would be to add a condition before your current condition that checks if the field is null. If the field is not null then go to the next condition that compares dates, if the field is null then go down a different branch.
Here is an example where I am checking a column named "Submit Date".
The first condition uses an expression on the Submit Date that checks if the field is empty() and if it is empty() then have an output of true, if it is not empty, then output of false. So if the condition is true, it goes down the no value branch, but if there is a value, it goes to the next condition where the date is compared.
The expression used is:
if(empty(items('Apply_to_each')?['SubmitDate']),true,false)
You can see the example below