cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AliaksandrV
Regular Visitor

Please help me add new columns "Username", "UserPhoto" to the local collection. Using Office365User.ID

Good afternoon!
Please tell me how I can add new columns "UserName", "UserPhoto" to the local collection. In the local collection there are IDs corresponding to Office365User.ID (the column is called Office365userId). I tried a lot, but it didn't work out. ClearCollect(ColI, AddColumns(colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName)); 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you so much, everything is already working, I found an error after I created this post. The formula is correct, my mistake was that I copied the collection. ClearCollect(colAllCandidates, AddColumns(colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName)); when I set-ClearCollect(ColI, AddColumns(colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName)) - Everything worked. I referenced the local collection twice, rather than using the database collection. Thank you again!

View solution in original post

3 REPLIES 3
AshwiniBhandari
Helper II
Helper II

Can you try using Collect function?

 

Collect(ColI,

AddColumns(

colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName

)

); 

Thank you so much, everything is already working, I found an error after I created this post. The formula is correct, my mistake was that I copied the collection. ClearCollect(colAllCandidates, AddColumns(colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName)); when I set-ClearCollect(ColI, AddColumns(colAllCandidates, "Name", Office365Users.UserProfile(ThisRecords.Office365userId).DisplayName)) - Everything worked. I referenced the local collection twice, rather than using the database collection. Thank you again!

View solution in original post

You can accept your own solution, so that this issue get's resolved and anyone facing the same issue can refer 🙂 Hope that works for you!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (66,545)