cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venseben Helper III
Helper III

Value from 'Office365-users'.MyProfile().TelephoneNumber is table values

Hi all.

 

I have a PowerApp that gets data from the users profile from the Office365-users'.MyProfile() function, from the current user, that is using the PowerApp. I have a problem with getting data from the the BusinessPhones field. I get this error when I try to get data from the MyProfile.BusinessPhones field into a textinput field:

 

The property of this control expects text values. The rule produces table values that are incompatible. Edit the rule to produce a {0} value

 

As far as I can see the error occurs because the BusinessPhones field is a table, and that is not compatible with my text input field. The question is how can I make a rule that gives me the phone number from the table (there is always only one number), and pass this number into a textinput field? Do I need to creat a galery to collect all of the the users data before I can use it int the textinput fields, or can I write some sort of function that can give me the data?

 

Greetings from Denmark

Frank Nielsen

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Value from 'Office365-users'.MyProfile().TelephoneNumber is table values

Hi @venseben 

 

As this is of type table, you can perform a concatenation if you want all the phone Number:
 
Expression: Concat(Office365Users.MyProfile().BusinessPhones,Value,",")
 
In case you just want to get only first Phone Number, please use: First(Office365Users.MyProfile().BusinessPhones).Value
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Value from 'Office365-users'.MyProfile().TelephoneNumber is table values

Hi @venseben 

 

As this is of type table, you can perform a concatenation if you want all the phone Number:
 
Expression: Concat(Office365Users.MyProfile().BusinessPhones,Value,",")
 
In case you just want to get only first Phone Number, please use: First(Office365Users.MyProfile().BusinessPhones).Value
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
venseben Helper III
Helper III

Re: Value from 'Office365-users'.MyProfile().TelephoneNumber is table values

@yashag2255  - YOU ROCK. That is awesome. THX a 1000 times Smiley Wink

Dual Super User
Dual Super User

Re: Value from 'Office365-users'.MyProfile().TelephoneNumber is table values

@venseben 

 

Glad I was of some help!!

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,094)