Hello,
I have a super simple flow that doesnt seem to work. Basically I am comparing two date fields, but 1 of the dates may be null.
I am using an OR condition to check if event Date is greater than the last event date OR the Last Event Date is Null.
The flow fails every time when the Last Event Date is Null. But I have setup the logic correctly and it would seem that this should work. But it fails every time the last event date is null. Why doesn't flow work as expected here?
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2706': 'The template language function 'greaterOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Null' that do not match.'.
Sorry, but this didn't work for me and my flow is almost identical. It seems to have an issue with the True part of the statement. Could you spell out the actual syntax you used for True? Sorry, I'm a novice at this.
Hi @Larry_Casey
I have created a list and added two date columns similar like yours. Assuming Event Date cannot be null then you can follow the below steps. If not change the logic similar like the empty check I am doing.
Above empty expression is as follows:
The problem is that if you don't set a default date on a date in SharePoint then Flow doesn't return that field in the results unless its filled in. So you can't test if the date value is Null because the field itself isn't included in the JSON results when you do a Get Item or Get Items. If you look at the JSON in your runs you'll see that the field itself is missing from some of the records. I think the only way to make this work is to default the date in SharePoint to some date in the distant past and then check against that date when you would check to see if its null. But at least if there was a date there then the field would be returned.
@abm I now understand what you were telling me. I did not realize I needed to use the field value in the empty string
All,
I have found the solution and really appreciate all your assistance and help. Everyone here contributed to finding the answer. I am not a programmer so this is all really new to me and now it makes sense. There is no Power Automate outage 😉
I had to use the following which was mentioned, but I didn't realize I needed to add the field value to empty.
@Larry_Casey could please you copy an paste what is inside of get items?
No matter what I try, Even if I remove the OR, Flow can not determine if a date field is empty.
This must be an Outage. I encourage anyone in this forum to try and you will see.
How can I check for empty like that in the OR condition?
Basically I just need to know whether the Last_Event_date is empty OR the Event_Date is Greater than or equal to the Last_Event_Date.
Then apply an action if True.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1