cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sam12
Helper II
Helper II

Date Field Condition Error

I am current building a scheduled Flow which archives items from a SharePoint list based on some logic that I have been sent across 7 different content types.

The logic is very similar across each of the content types so I will use this one as an example:

Content Type = CA-MandatoryEvent

If "Event Completed" = Yes AND "Client Account Updated" is more than one year old

OR

If "Cancelled" = Yes AND "Modified" is more than one year old

I have built this, and whilst in theory it work, I am getting the below error message on some items:

InvalidTemplate. Unable to process template language expressions for action 'Condition_3' at line '1' and column '2805': 'The template language function 'lessOrEquals' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.

Upon further invesigation, it appears some of the items are blank for the Client Account Updated field. Where this is the case, we just want to ignore them. My only suggestion is to add a step in the Flow to populate the Client Account Updated field with a date unrealistcially in the future so that this condition won't be met, which obviously isn't the ideal solution. Does anyone have any other suggestions please?

The below is what I have so far:

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Sam12 ,

 

If the Client Account update is null, the condition control will fail.

Please try to add a condition above CA-MandatoryEvent and check if Client Account Update field is null.

Image reference:

120.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
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

3 REPLIES 3
v-bacao-msft
Community Support
Community Support

 

Hi @Sam12 ,

 

If the Client Account update is null, the condition control will fail.

Please try to add a condition above CA-MandatoryEvent and check if Client Account Update field is null.

Image reference:

120.PNG

Hope this helps.

 

Best Regards,

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

Thanks @v-bacao-msft - does the below look correct to you based on this logic assuming we have a lot of items where Client Account Updated is null?

If "Event Completed" = Yes AND "Client Account Updated" is more than one year old

OR

If "Cancelled" = Yes AND "Modified" is more than one year old

Capture1.PNG

 

Hi @Sam12 ,

 

You are right!

 

Best Regards,

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,844)