cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Brahmaji
Level: Powered On

read and save operations on multiple persons/group into SharePoint List from powerapps Combobox

Hello ,

I need to save(New Form) and update(Edit Form) the user info in multiple Persons/Groups column of my SP list.

I am selecting the data from a Combobox.

When i do "cb.selected.value' it is storing one value.

When i reading values from the list i am not able to select the values in combobox.

How can i do this??

3 REPLIES 3
Community Support Team
Community Support Team

Re: read and save operations on multiple persons/group into SharePoint List from powerapps Combobox

Hi @Brahmaji ,

Could you please share a bit more about the Person/Groups column in your SP list? Do you enable "Allow Multiple selections" option for it?

How do you save the Multiple Person column value into your SP list? Using SubmitForm function or Patch function?

Further, could you please share a screenshot about your app's configuration?

 

I assume that you use SubmitForm function to submit your form data, based on the formula you provided, I think there is something wrong with it.

I have made a test on my side, please take a try with the following workaround:1.JPG

Within your Edit form, set the Update property of the Person column Data card which contains the Combo Box control to following:

DataCardValue12.SelectedItems

On your side, you should type:

YourComboBox.SelectedItems

Or

ForAll(
        YourPersonComboBox.SelectedItems,
        {
          '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           Claims: "i:0#.f|membership|" & Lower(Email),
           Department: "",
           DisplayName: DisplayName,
           Email: Email,
           JobTitle: "",
           Picture: ""
        }
)

Set the DefaultSelectedItems property of the Combo Box within the Person column Data card to following:

Parent.Default

 

If you use Patch function to submit your Person Combo Box value (multiple values) into your SP list, I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

Patch(
         'YourSPList',
          Defaults('YourSPList'),
          {
            Title: DataCardValue1.Text
            YourPersonColumn: ForAll(
                                     YourPersonComboBox.SelectedItems,
                                    {
                                     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                                      Claims: "i:0#.f|membership|" & Lower(Email),
                                      Department: "",
                                      DisplayName: DisplayName,
                                      Email: Email,
                                      JobTitle: "",
                                      Picture: ""
                                  }
                           ),
... } )

 

In addition, on your side, you could also consider take a try to generated an app based on your SP list, then you could use the generated app to do some add, edit and delete operations to your SP list.

More details about generating an app based on a SP list, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/app-from-sharepoint

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Brahmaji
Level: Powered On

Re: read and save operations on multiple persons/group into SharePoint List from powerapps Combobox

Hi,

Thank you for solution. I follow your steps and i am able to save the multiple users into list but in Edit form i am unable to select the items in Combo Box.

I have 2 lists ---- 1) Master list  having  columns --- User Name(Multiple Persons/group), User Email(Single line of Text)

                            2) child list having columns ---- User Email ,User Display Name (both are Single line of Text).

Form  --- Datacard -- i added the Combo Box and bind the child list data. For Datacard default i set the                                                             combobox.selectedItems

On submit i wrote the patch function as you said data is storing in both columns perfectly.

while reading i am trying to set the value for combobox. Items are not selecting in combobox

GFinlayRPS
Level: Powered On

Re: read and save operations on multiple persons/group into SharePoint List from powerapps Combobox

Hi I realise this was a few months ago but I have followed your instructions but when I change the Update value in the DataCard to Combobox1.SelectedItems I get an error saying 'Expecting Record Value' My EditForm is set to FormMode.New, the SP List column has Multiple Selections added and I have everything else set up as you have said, the ForAll gives me the same error.  Do you have any idea what is going wrong?

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,430)