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

Accessing record within a record (Context Variable, Office365Users)

I have this variable UserProfile which is created like that:

UpdateContext({UserProfile:Office365Users.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

View solution in original post

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

View solution in original post

Super User
Super User

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

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,666)