cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Dual Super User III
Dual Super User III

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

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

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
Advocate II
Advocate II

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

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

Highlighted
Dual Super User III
Dual Super User III

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

@venseben 

 

Glad I was of some help!!

Highlighted
Frequent Visitor

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

What if I want to put the first one in one field (I can do that with first) and list the second one somewhere else?  How can I specify which one I want (other than first)? Can I put a [0] or [1] somewhere to say whether I want the first or second one?

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,087)