cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Add Columns and get email address

I have a collection that I need to add displayNames to.   The email address is in the Title column. 

 

So I have this:

 

ClearCollect(
AllRequests,
AddColumns(
PremiumLicenseRequests,
"Licensee", Office365Users.UserProfileV2(PremiumLicenseRequests.Title).displayName)

 

It's giving me an "Expect a text value", this is a record error.    I am not sure how to fix this within the Add Columns function.
)
;



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Please consider changing your Formula to the following:

ClearCollect(
    AllRequests,
    AddColumns(
        PremiumLicenseRequests,
        "Licensee", Office365Users.UserProfileV2(Title).displayName
    )
)

If Title is the email, then it will be just fine.

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Please consider changing your Formula to the following:

ClearCollect(
    AllRequests,
    AddColumns(
        PremiumLicenseRequests,
        "Licensee", Office365Users.UserProfileV2(Title).displayName
    )
)

If Title is the email, then it will be just fine.

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

I was hoping you would see this one.   I will give that a try.   Thanks!



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

In the grand scheme of Add Columns and Show columns, which comes first?

 

AddColumns(

  ShowColumns(

 

Or the other way around?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Everything works from the inner out. 

If you look at the function ShowColumns and AddColumns, the first parameter expected is a table.

So, in your snippet, ShowColumns returns a table that is used as the first parameter of AddColumns.

 ShowColumns will return a table based on its criteria, that table is then used as the input table to AddColumns.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,910)