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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,919)