cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Another Get Items OData Filter Question

I have a list that contains a column for email addresses (single line of text). The user wants to store 1 or many email addressed separated by a comma (user1@domain.com,user2@domain.com) in this column. Upon firing the Flow, I am to retrieve an item's data based on the email address (or addresses separated by a column) being passed matching value(s) in the email column.

 

Pretty straight forward to do this for one email address.  Filter Query: EmailAddress eq strVarEmailAddres

 

I have no idea when there will be one email address in the column or more that one separated by a column. I realize I need to dynamically create the Filter string. Not sure of the best way.  I feel like I am taking "3 left turns in order to make a right turn".

 

What is the best way to go about searching for two possible values in one column using an "OR"?

 

If there are two values in the EmailAddress column I can use split(). Am I on the correct path for this?

Filter Query: OR(substring(EmailAddress, split(strVarEmailAddress,',')[0]), substring(EmailAddress, split(strVarEmailAddress,',')[1]))

 

Bob

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous  the variable is used as text in filter query, you need to select the variable from dynamic content see, below screenshot. Also remove quotes from 'EmailAddress', it should be EmailAddress without quotes, the variable should be within quotes., see below screenshot.

annajhaveri_0-1623082470310.png

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
annajhaveri
Community Champion
Community Champion

@Anonymous  you need to provide the Filter Query as follows

 

substringof('string', Column)

 

Replace string with the email address

Replace Column your column name 'EmailAddress'

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

using substringof produces an error:

"The function operator 'substringof' is not supported or its usage is invalid."

@Anonymous  please share screenshot of your Get Items action,  i would like to review how you have used the substringof filter query.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Screenshot attached.

 

Flow-substringof-getitems.png

@Anonymous  the variable is used as text in filter query, you need to select the variable from dynamic content see, below screenshot. Also remove quotes from 'EmailAddress', it should be EmailAddress without quotes, the variable should be within quotes., see below screenshot.

annajhaveri_0-1623082470310.png

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Typos left over from trying numerous things. Thank you @annajhaveri! I am getting the results expected now. Just have to clean up the response.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,789)