web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The property expects R...
Power Apps
Answered

The property expects Record values, but this rule produces incompatible Text values

(1) ShareShare
ReportReport
Posted on by 1,662

Hello everyone,

 

I'm working on a PowerApps form connected to a SharePoint list. This list contains several different fields; single line of text, date and time, and person/group. One of the requirements is to retrieve the current user's manager and automatically populate the Person field in PowerApps. As everybody else has mentioned, a SharePoint Person/Group field becomes a dropdown in PowerApps and it's difficult to set a default value to it. For example, I can retrieve the current user's manager and pass its value to a label or text field, but can't pass it to this dropdown. Whenever I try to set the value using the formula: 
Office365Users.Manager(Office365Users.MyProfile().Mail).DisplayName, I get the message "The property expects Record values, but this rule produces incompatible Text values".

 

Has anybody had any luck achieving this? Thanks in advanced.

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @faustocapellanj,

     

    Sorry but the Office365Users.MyProfile().Mail and Office365Users.UserProfile( ).DisplayName are both for Office 365 Users connector, not for SharePoint Person/Group column. Office 365 users connector gets user accounts from the Azure AD not SharePoint. This is why the formula won't work as expected. Please try to add the office 365 data source in this app and then test.

     

    Regards,

    Mona

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @faustocapellanj

     

    I had setup SharePoint Person/Group field which automatically defaults to user manager.

     

    To achieve this you have to add Office 365 Users connector.

     

    In the OnVisible property of the Screen where the Form is located I have the following function:

     

    UpdateContext(
     {
     Manager:Office365Users.Manager(First(UserProfileCollection).Id)
     }
    )

    Basically this LooksUp the manager of the person. 

     

     

    UserProgileCollection is a collection which is setup on the start of the app this way:

    Collect(UserProfileCollection,Office365Users.MyProfile()))

    Basically, it just collects all info available from the Office 365 Users connector on the User.

     

    Then in your form for the Person/Group card add the following formula for the Default property:

     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:Concatenate("i:0#.f|membership|",Manager.Mail),
     Department:Manager.Department,
     DisplayName:Manager.DisplayName,
     Email:Manager.Mail,
     JobTitle:Manager.JobTitle,
     Picture:""
     }

     

     

    You can do all the calling in the Default function but it will slow down your app, as well as, you can do it for any user in your organization if you know their email.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi @v-monli-msft,

     

    While I thank you for taking the time to reply to my issue, I am aware that I need to use the Office 365 Users connector and I am currently using it in my application. My issue is not retrieving information about the current user, but with setting a default value to a Person field dropdown in PowerApps. Another user, @Anonymous, suggested an approach to achieving what I'm trying to do, but I'm not able to set such default value.

     

    Thanks.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi @Anonymous,

     

    I had posted something before about your suggestions not working, but I just checked my app and the field is populated with the current user manager. Thank you so much.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard