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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Saving default manager...
Power Apps
Answered

Saving default manager back to SharePoint list is not working

(0) ShareShare
ReportReport
Posted on by

Hello awesome people! I'm trying to apply a Global Variable:

Set(VarUser, Office365Users.MyProfileV2());
Set(VarManager,Office365Users.ManagerV2(VarUser.userPrincipalName))

 

To my form called FormEdit with DefaultSelectedItems set to the following for that field where I'm trying to retrieve the Manager name of the user logged in. So when I click on creating a new form, the manager does populate correctly, but then when I submit the form (using a check mark icon with SubmitForm(FormEdit). 

 

If(FormEdit.Mode = FormMode.New,
Filter(
Table(
{
'@aodata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName: VarManager.displayName,
Claims: "i:0#.f|membership|" & VarManager.mail
}),
Not(IsBlank(DisplayName))),
Parent.Default)

 

Why is the Manager name not saving to the SharePoint list? Once SubmitForm executes, it just sets itself back to blank (nothing selected). But the rest of

 

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    Do you want to use current user's manager to update person field in your sharepoint list?

    Could you tell me whether your person field allows multiple value?

    I've made a similar test but not met the same problem like your description.

    You could refer this:

    set the app's OnStart:

    Set(VarUser,Microsoft365Users.MyProfileV2());
    Set(VarManager,Microsoft365Users.ManagerV2(VarUser.userPrincipalName))

    //please notice that this connector has renamed to Microsoft365Users, not Office365Users any more.
    1)if your person field not allows multiple value:

    set the combo box's DefaultSelectedItems:

    If(Form1.Mode = FormMode.New,
    Filter(
    Table(
    {
    '@aodata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    DisplayName: VarManager.displayName,
    Claims: "i:0#.f|membership|" & VarManager.mail
    }),Not(IsBlank(DisplayName))),Table(Parent.Default))
    

    2)if your person field  allows multiple value:

    set the combo box's DefaultSelectedItems:

    If(Form1.Mode = FormMode.New,
    Filter(
    Table(
    {
    '@aodata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    DisplayName: VarManager.displayName,
    Claims: "i:0#.f|membership|" & VarManager.mail
    }),Not(IsBlank(DisplayName))),Parent.Default)

     

    My person fields both have been updated successfully.

     

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Thank you for the reply. I followed your instructions and connected to the new Microsoft 365 Users, and was able to pull user and manager successfully into a test label. However, the field that I'm trying to populate is still not filling with the Manager name. Is there another setting I'm missing on that field? Before it was defaulting but not saving, now it's not even defaulting.

     

    Any suggestions?

     

  • Community Power Platform Member Profile Picture
    on at

    Please disregard the last note. I saved, closed, reopened and tried again, and it worked, so must have some cached info somewhere.

    Thank you so much!!!!! I really appreciate your help, you're awesome!!!!

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard