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 / Using a Form to Update...
Power Apps
Unanswered

Using a Form to Update Multiple Users in a Person Field in SharePoint

(0) ShareShare
ReportReport
Posted on by

Hello All,

 

I am currently using a PowerApp edit form connected to a SharePoint list. I have a Person Field "Addl_Team" on SP that allows multiple entries.

 

I can get my multiselect-enabled combobox in my form to create an entry with multiple people, but if I go back into the app and I decide that I need to add another person to these selections, it overwrites my existing multi-selections with just that one new person I picked.

 

This is the code I have attached to my Update function of my DataCard:

ForAll(DataCardValue12.SelectedItems,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: Mail,
DisplayName: DisplayName,
Email: Mail
})

 

I have a feeling it may be my DefaultSelectedItems on the DataCardValue in the combobox playing a role in this, but I want it so users can see who they already picked and add or subtract from there:

ThisItem.Addl_Team.DisplayName

 

Any ideas what might be wrong? Any other ways to populate the pre-existing selected people without this happening?

Please let me know if you need any more info.

 

Thanks so much and so very appreciated!

Lindsey

Categories:
I have the same question (0)
  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Anonymous 

    the default settings when you add a datacard based on a multiselect sp column are: 

     

    DataCard.Update = DataCardValue12.SelectedItems

    DataCardValue12.DefaultSelectedItems  = Parent.Default

     

    that should work and resolve your issue

  • Community Power Platform Member Profile Picture
    on at

    Hi @Alex_10 ,

    Thanks for your reply! I just tried this and unfortunately this isnt prepopulating the existing people selections when I load the Update form so I cant see the already seected people in the combobox when I reload the app  😞

    Lindsey

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Anonymous 

     

    it looks like for that field you created a custom datacard.

     

    can you try:

     

    - delete the datacard from the form

    - save the app and close it

    - open the app and add the data card from right settings panel 'yourUpdateForm'->Edit Fields->Add Field

     

    that will add a datacard to the form with all default settings, that should prepopulate existing people for existing records

     

     

  • Community Power Platform Member Profile Picture
    on at

    @Alex_10 Unfortunately this puts me back where we started where i go to add a new person to the and then it replaces the whole list with my new selections rather than adding it to the original select list 😞

    Perhaps I need a Flow?

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Anonymous 

     

    ok. there is no need in flow to make it work.

     

    I need to know what is in:

    - updateForm.Item

    -updateForm.DataSource

    - datacard.datafield         (the datacard where the people combobox is added)

    - datacard.default            (the datacard where the people combobox is added)

    - combobox.Items

    - combobox.DefaultSelectedItems

    - when you submit a new form or submit edited form, do you use SubmitForm() or Patch()?

     

     

  • Paramesh Ulthi Profile Picture
    17 on at
    Hi All,

    I'm facing the same issue, could you please let me know if this is solved or any turn around solution?
    Thanks in advance
  • CU11111929-0 Profile Picture
    4 on at
    Hi All,
    The procedure below might work.
     
    Example of structure:
    Form1 > Card1 > ComboBox1

    The ComboBox should be of the type of classic ComboBox for now.

    Items property of ComboBox1:
     
    Choices(yourlistname.userfieldname)

    Update property of Card1:
     
    ForAll(ComboBox1.SelectedItems,

    {
    Claims: "i:0#.f|membership|" & Email,
    DisplayName: DisplayName
    }

    )

    OnSelect property of submit button:
     
    SubmitForm(Form1);
     
    Please let me know if you have any questions.
     
    Thank you
  • CU11111929-0 Profile Picture
    4 on at
    Hi All,
     
    Please let me add this information.
     
    If you plan to use Power Automate
    to send an email to multiple users in a single email,
    the following thread might be helpful:
     
     
    Thank you.
     
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at
    When patching to a Person field, you need to send the whole schema. As you seem to be using the Office365Users.SearchUser function in the Items, this schema is different from that of the person field you are reading from / writing to, so the Update would be
    ForAll(
       DataCardValue12.SelectedItems As _Items,
       {
          Claims: "i:0#.f|membership|" & Lower(_Items.Mail),
          Department: "",
          DisplayName: _Items.DisplayName,
          Email: _Items.Mail,
          JobTitle: "",
          Picture: ""
       }
    )
    and the DefaultSelectedItems
    ForAll(
       ThisItem.Addl_Team As _Items,
       {
          Mail: _Items.Email,
          DisplayName: _Items.DisplayName
       }
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard