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 II
Super User II

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 II
Super User II

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
Microsoft
Microsoft

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

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

Top Solution Authors
Top Kudoed Authors
Users online (83,590)