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 / Save Multiple Values i...
Power Apps
Answered

Save Multiple Values in Multiple rows in Sharepoint List

(0) ShareShare
ReportReport
Posted on by 166

@v-xida-msft , All,

 

I have a question. Not sure whether it is possible to  execute or not. Require your help as always.

I have a SP List with the columns as shown in the reference pic. 

 

Note: Employee Name is people picker column in sharepoint.

 

I created an app where i can select multiple employee names via people picker and want to save it to SP list. Here is where I am struggling. I want different names in different rows and not in a single row. The pic below may give you an idea. Is it possible to patch multiple values selected from people picker column in app to SP list? 

On the other hand, when i tried using a text column where i can enter employee names manually in Text Input, I was able to save it in the SP list using the below code (";" being the separator) 

 

However, i am not sure how to split the names and add it to the SP list as different rows from people picker. 

 

For example, if i select ABC; BCD; CDE; in employee name, i want them to save in sharepoint list as different rows as below
ABC

BCD

CDE

 

Kindly help.

 

FGD1.JPGFGD2.JPG

 

Thanks in advance.

 

Regards

Sasidhar

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

    Hi @sasidhar_mudra ,

     

    Do you want to patch multiple people to different rows?

    Do you use combo box to select the people?

     

    If so, you should set Items property of combo box to Choices('SP list'.EmployeeName) .

    Also set the following formulas to OnSelect property of button

     

    ForAll(ComboBox1.SelectedItems,Patch('SP list',Defaults('SP list'),{Title:"SA",EmployeeName:{Claims: Claims,Department:"",DisplayName:"",Email:"",JobTitle:"",Picture:""}}))

     

    Annotation 2019-11-05 144120.png

    Annotation 2019-11-05 143457.png

    Hope this helps.

    Best regards,
    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

     

  • sasidhar_mudra Profile Picture
    166 on at

    @v-siky-msft ,

     

    Sorry for the delay in responding. Could not try this earlier.

     

    Tried your input. I see an error. PFB screenshot. Not sure why the error.

     

    However, i have another question. What if i have two combo boxes in the same form, is there a possibility of making them independent of one another.

     

    FGD3.jpg

     

    Thanks

    Sasidhar

  • v-siky-msft Profile Picture
    on at

    Hi @sasidhar_mudra ,

     

    It seem that your Employee Name column allow multiple selection, right?

    So we should patch a table to Employee Name column, just use Table() function. Please modify the formula as below:

     

    ForAll(ComboBox1.SelectedItems,Patch('SP list',Defaults('SP list'),{Title:"SA",EmployeeName:Table({Claims: Claims,Department:"",DisplayName:"",Email:"",JobTitle:"",Picture:""})}))

     

     

     Best regards,

    Sik

     

  • sasidhar_mudra Profile Picture
    166 on at

    @v-siky-msft ,

     

    Hi Sik,

     

    Apologies for the delay. I am out of office. I tried with the above mentioned formula, however, i was still receiving the error.

     

     

    Thanks

    Sasidhar 

  • v-siky-msft Profile Picture
    on at

    Hi @sasidhar_mudra ,

     

    Could you share the more error information ?

    Does your Employee Name column allow multiple selection?

     

    Best regards,

    Sik

  • sasidhar_mudra Profile Picture
    166 on at

    @v-siky-msft ,

     

    yes, it allows multiple selection. 😞

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @sasidhar_mudra ,

     

    That is really wired! I post my steps as below, please take a try and check if you issue still remains. I recommend you test on a new App.

    1. Test on SP list name "Test 0910" with a "pp2" column (Person column, allow multiple selection)

    2. Create a combo box, set the items property to Choices('Test 0910'.pp2)

    3. Create a button, set OnSelect property as below

     

    ForAll(ComboBox2.SelectedItems,Patch('Test 0910',Defaults('Test 0910'),{Title:"Test",pp2:Table({Claims: Claims,Department:"",DisplayName:"",Email:"",JobTitle:"",Picture:""})}))

     

    When I select four items in combo box, and click the button, the SharePoint list will create four rows, and four people are filled into four rows respectively.

    Snipaste_2019-11-14_16-05-19.pngSnipaste_2019-11-14_16-06-11.png

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • sasidhar_mudra Profile Picture
    166 on at

    @v-siky-msft ,

     

    Thank you so much... You've been persistent in getting me the solution. Really appreciate it 🙂

    It worked 🙂

     

    I would like to understand the below if you can. I do not understand this.

    pp2:Table({Claims: Claims,Department:"",DisplayName:"",Email:"",JobTitle:"",Picture:""})

     

    Thank you once again Sik...

     

     

    Regards

    Sasi

  • v-siky-msft Profile Picture
    on at

    Hi @sasidhar_mudra ,

     

    Because your person column allow multiple selection, so you should patch a table instead of record to the column.

    Table function is to create a temporary table, for more reference : Table function in PowerApps 

    Best regards,

    Sik

     

  • sasidhar_mudra Profile Picture
    166 on at

    @v-siky-msft ,

     

    Thanks for this Sik.

     

     

    Regards

    Sasi

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