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.

@BCLS776 ,

Thank you for your help! It worked expectedly!!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

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,592)