cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SebastianN
New Member

Unable to filter into array via 'Search for users (V2)'

Hi,

 

I cannot get the search for users to pass on a specific field's information in a loop (apply to each)

I eventually want to use it to update a row in an Excel list, but after various tries I cannot get the information to be passed on into an array. I can get this to work if it's only one user, but instantly when I need it to go through a bunch of emails, it won't do what I need; to pick out the department based on the users email addresses. I have tried various ways, this is where I am at now. Anyone know how to solve this?

 

 

Screen Shot 2021-10-28 at 18.11.51.png

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Community Champion
Community Champion

If you need the users department, you can easily get this using an expression:

2021-10-28_22-57-04.png

You should be able to copy-and-paste this expressions into your flow:

outputs('Search_for_users_(V2)')?['body/value'][0]['Department']

 

Here is an example run, which returns the department Retail for user 

2021-10-28_23-00-44.png


Ellis

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
ekarim2020
Community Champion
Community Champion

Does the email column contain multiple email addresses? If so, how is each email address separated from another?

2021-10-28_20-09-38.png

Can you post some sample Excel data?

Ellis

SebastianN
New Member

Hi Ellis,

 

The Excel file's data is in a table and contains one email per row in the "eMail" column.

The 'Search for Users (V2)' request goes through, but it's the step after that I cannot get to work...

 

/ Sebastian

ekarim2020
Community Champion
Community Champion

If you need the users department, you can easily get this using an expression:

2021-10-28_22-57-04.png

You should be able to copy-and-paste this expressions into your flow:

outputs('Search_for_users_(V2)')?['body/value'][0]['Department']

 

Here is an example run, which returns the department Retail for user 

2021-10-28_23-00-44.png


Ellis

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,270)