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
ForAll(
DataCardValue12.SelectedItems As _Items,
{
Claims: "i:0#.f|membership|" & Lower(_Items.Mail),
Department: "",
DisplayName: _Items.DisplayName,
Email: _Items.Mail,
JobTitle: "",
Picture: ""
}
)
ForAll(
ThisItem.Addl_Team As _Items,
{
Mail: _Items.Email,
DisplayName: _Items.DisplayName
}
)
@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()?
@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?
@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
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
@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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.