cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Accessing record within a record (Context Variable, Office365Users)

I have this variable UserProfile which is created like that:

UpdateContext({UserProfileSmiley Surprisedffice365Users.MyProfile()})

Everything works fine in the Variables (experimental) I can check that it is correctly assign with good values.

 1.png

The column BusinessPhones is a record so I click on it and it has Value which is the phone number

 2.png

In the PowerApps if I try to access this value it gives me errors

3.png

I tried

UserProfile.BusinessPhones

And

UserProfile.BusinessPhones.Value

None work. Do you know how to access this value?

 

NOTE: I can easily access otehr variables of the record (UserProfile.DisplayName, UserProfile.Mail, etc.)

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Accessing record within a record (Context Variable, Office365Users)

The value of the BusinessPhones property of the UserProfile is a list of phones, not a single number. You can use the First function to take the first element and show that phone number:

"Business phone: " & First(UserProfile.BusinessPhones).Value
2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Accessing record within a record (Context Variable, Office365Users)

The value of the BusinessPhones property of the UserProfile is a list of phones, not a single number. You can use the First function to take the first element and show that phone number:

"Business phone: " & First(UserProfile.BusinessPhones).Value
Super User
Super User

Re: Accessing record within a record (Context Variable, Office365Users)

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 228 members 5,345 guests
Please welcome our newest community members: