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

Condition And Or not working

I am struggling with the AND OR condition. I have a column ‘ApprovalStaus’ which is set as a choice and dropdown (Pending, Approved and rejected), this dropdown gets updated via an approval flow, I then have a column ‘FAQ’ set to single line text.

 

I am trying to set up a condition that if ApprovalStaus equals to Approved AND FAQ is NOT empty (not null) OR ApprovalStatu equals Rejected the condition is True

 

I have set the below:

1.JPG

But I receive this error:

Unable to process template language expressions for action 'Condition' at line '1' and column '13132': '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.'.

 

I have also tried:

2.jpg

And get this error:

Unable to process template language expressions for action 'Condition' at line '1' and column '13133': '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 'Boolean'.'.

 

Also using the empty syntax I don't get anywhere

not(equals(triggerOutputs()?['body/FAQ'], empty))

 

What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

Are you looking for this?

 

DamoBird365_0-1617106153197.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

View solution in original post

4 REPLIES 4
DamoBird365
Community Champion
Community Champion

@mtagliaferri 

 

Probably because FAQ is a string and not an array. 

 

Your 2nd version would work if you set the is equal to 'true'

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

@DamoBird365 

 

Thanks I solved the issue of the FAQ part triggering, but I am still having problems with the OR condition, it is still returning False

 

Basically I am in need to return True when Approved and FAQ not empty, or if the approval is Rejected.

 

I don't understand why the approach I have taken would not work.

Capture.JPG

Are you looking for this?

 

DamoBird365_0-1617106153197.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

View solution in original post

@DamoBird365 That has done the trick!! thanks very much for the help!!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (28,837)