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
Solved! Go to Solution.
@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.
@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'
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.
Screenshot attached.
@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.
Typos left over from trying numerous things. Thank you @annajhaveri! I am getting the results expected now. Just have to clean up the response.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
72 | |
27 | |
22 | |
15 | |
13 |
User | Count |
---|---|
140 | |
42 | |
42 | |
35 | |
30 |