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. ]
askondo
Community Support
Community Support

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

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,444)