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

How to start a list workflow only when a list field is not empty?

I have a list based workflow. I am trying to trigger this workflow only when a field is NOT empty. I understand that I can add a trigger condition to "When an item is created or modified" similar to the following:

 

@not(contains(triggerBody()?['Resolution']?['Value'], null))

 

But I get the following error when I do so:

 

InvalidTemplate. Unable to process template language expressions for trigger 'When_an_item_is_created_or_modified' at line '1' and column '4720': 'The template language function 'contains' expects parameters of matching types: a dictionary and a key (string), an array and a value (object), or a string and a substring. The provided types 'String' and 'Null' are incompatible. Please see https://aka.ms/logicexpressions#contains for usage details.'.

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

 

Hi @sranacdw ,

 

Please try to use empty() function to check if the field is empty.

@equals(empty(triggerBody()?['Resolution']?['Value']), false)

 

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

2 REPLIES 2
Community Support
Community Support

 

Hi @sranacdw ,

 

Please try to use empty() function to check if the field is empty.

@equals(empty(triggerBody()?['Resolution']?['Value']), false)

 

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

Will try and post my update here

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,788)