cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tessej
Frequent Visitor

Concat 2 or more expressions

Hi folks,

 

I use the following expression as a filter for a RSS feed:

  • @And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'Microsoft'))

Now I want to add a second and maybe a third expression which needs to act as parallel filter options. So the second expression looks like this:

  • @And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'VMware'))

How can I 'connect' these two expressions so the filter gives the result for the first expression or the second expression or....

 

Kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @tessej ,

remove the @ from the expressions, put them into @or:

@Or(And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'Microsoft')),And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'VMware')))

*I hope I've got the brackets right

Each OR / AND can compare only 2 values/expressions, if you need more of them you must group them: e.g. evaluate the first two, then the result of the first two with the third, then the result of 1+2+3 with 4...

@or(expression1,expression2)
@or(or(expression1,expression2),expression3)
@or(or(or(expression1,expression2),expression3),expression4)

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @tessej ,

remove the @ from the expressions, put them into @or:

@Or(And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'Microsoft')),And(contains(string(item()?['title']), '[H/H]'),contains(string(item()?['title']), 'VMware')))

*I hope I've got the brackets right

Each OR / AND can compare only 2 values/expressions, if you need more of them you must group them: e.g. evaluate the first two, then the result of the first two with the third, then the result of 1+2+3 with 4...

@or(expression1,expression2)
@or(or(expression1,expression2),expression3)
@or(or(or(expression1,expression2),expression3),expression4)

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

askondo
Community Support
Community Support

@tom_riha Thank you for all your contributions to the forum. I appreciate it very much.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,972)