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

Help with Trigger Conditions

I have a flow i want to run only if a list column is equal to a choice field text.  Example would be Business Unit is equal to Indiana.  

 

I've tried @equal and @contains but neither are working and not sure what the issues could be.  

 

The column is a drop down between Indiana Chicago and Michigan.  

 

@contains(triggerBody()?['Business Unit Value'], 'Indiana')

@equals(triggerBody()?['Business Unit Value'], 'Indiana')

1 ACCEPTED SOLUTION

Accepted Solutions
eenochs Helper I
Helper I

Re: Help with Trigger Conditions

With everyone's help i was able to figure out the correct command, thanks for all your help. 

 

This is the trigger command that worked. 

 

@equals(triggerBody()?['Business_x0020_Unit']?['Value'], 'Indiana')

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Help with Trigger Conditions

Hi @eenochs 

 

Drop down column return Id and value , so you should use value property in your condition:

following should work :

 

@contains(triggerBody()?['<Column Name>']?['Value'], Indiana)  (Note: no ' ' in indiana) 
 

 

——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Community Support
Community Support

Re: Help with Trigger Conditions

Hi @eenochs ,

 

If the Business Unit column is a choice field and don't allow multiple selections, the expression should as below:

 

@contains(triggerBody()?['BusinessUnit']?['Value'], 'Indiana')

@equals(triggerBody()?['BusinessUnit']?['Value'], 'Indiana')

 

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

eenochs Helper I
Helper I

Re: Help with Trigger Conditions

Not having the ' ' around Indiana didn't allow me to save the flow.  

eenochs Helper I
Helper I

Re: Help with Trigger Conditions

This is still not working.  Using either the contains or the equal i'm getting the following error.  

 

InvalidTemplate. Unable to process template language expressions for trigger 'When_an_item_is_created' at line '1' and column '11402': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

eenochs Helper I
Helper I

Re: Help with Trigger Conditions

With everyone's help i was able to figure out the correct command, thanks for all your help. 

 

This is the trigger command that worked. 

 

@equals(triggerBody()?['Business_x0020_Unit']?['Value'], 'Indiana')

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,121)