cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sam44
Helper III
Helper III

Want to lookup while ForAll

I’m creating Canvas App with SharePoint and Office 365 User connectors.

In SharePoint custom list, there is a column named “Employee UPN” and store multiple employee UPN as xxx@contoso.com,yyy@contoso.com,zzz@contoso.com.

 

At Canvas App, I would like to create collection with Azure AD record value by lookup employee UPN.

l’ve tried this with…..  Collect(colAADRecords, ForAll(Split(Employee UPN, “,”) As _EmpUPN , LookUp(Office365User, _EmpUPN = UserPrincipalName)).     like that, but got error….

 

How can I archive this goal?

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
BCLS776
Super User
Super User

Try something like this:

 

ClearCollect(colAADRecords,
    ForAll(Split(Employee UPN, ",").Result,
        {UserRecord: Office365Users.UserProfileV2(ThisRecord.Result)}
    )
)

Hope this helps,

Bryan

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
BCLS776
Super User
Super User

Try something like this:

 

ClearCollect(colAADRecords,
    ForAll(Split(Employee UPN, ",").Result,
        {UserRecord: Office365Users.UserProfileV2(ThisRecord.Result)}
    )
)

Hope this helps,

Bryan

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

@BCLS776 ,

Thank you for your help! It worked expectedly!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

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 (1,934)