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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Inserting multiple row...
Power Apps
Unanswered

Inserting multiple rows into a Sharepoint list from Combobox

(0) ShareShare
ReportReport
Posted on by 8

I am able to insert a single row from a selected item in a combobox but am unable to insert multiple rows into a Sharepoint list from the selected items in a combobox. 

 

I am thinking of trying to do so by iterating through the selected items in a combobox, but not sure how to proceed. Or are there any better ways of doing it?

 

ForAll(DataCardValue_Authors.SelectedItems, Patch(BooksAuthors, Defaults(BooksAuthors), {Title: " ", BookID: Var_UID.ID, AuthorID: (DataCardValue_Authors.SelectedItems).ID}));

 

Also, is there a way to remove the Title Column from a sharepoint list without affecting the insertion of rows into a sharepoint list?

Categories:
  • WarrenBelz Profile Picture
    156,736 Most Valuable Professional on at

    Hi @gopher1 ,

    You need to simply refer to the .Selected.xxxx (Value/Result/Field Name) of the Combo Box

    ForAll(
     DataCardValue_Authors.SelectedItems, 
     Patch(
     BooksAuthors, 
     Defaults(BooksAuthors), 
     {
     Title: " ", 
     BookID: Var_UID.ID, 
     AuthorID: xxxx
     }
     )
    )

    For the Title, go to your SharePoint List Settings and make the field not required.

     

    Please click Accept as solution 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 Thumbs Up.

  • gopher1 Profile Picture
    8 on at
    ForAll(
     DataCardValue_Authors.SelectedItems, 
     Patch(
     BooksAuthors, 
     Defaults(BooksAuthors), 
     {
     Title: " ", 
     BookID: Var_UID.ID, 
     AuthorID: DataCardValue_Authors.Items.ID
     }
     )
    )

    Using the above command will create two entries in the Sharepoint List if two authors are selected in the combobox, however the authorid will be the same (the second authorid).

     

    For the Title, after selecting the option in SharePoint List Settings to make the field not required, an error occurs. Upon selecting Get help for the error, it shows an Issue, Title: Field: "Title" is required.

     

  • WarrenBelz Profile Picture
    156,736 Most Valuable Professional on at

    @gopher1 ,

    Something needs refreshing in your app on the title - it should work as soon as you set it not required.

    As for the AuthorID, what is the valid output of 

    DataCardValue_Authors.Selected.????

    Using the value for instance Author if you had this field in the List Authors in the field AuthorName with and wanted the ID of the record

    ForAll(
     DataCardValue_Authors.SelectedItems, 
     Patch(
     BooksAuthors, 
     Defaults(BooksAuthors), 
     {
     Title: " ", 
     BookID: Var_UID.ID, 
     AuthorID: 
     Lookup(
     Authors,
     AuthorName=Author
     ).ID
     }
     )
    )

     

    Please click Accept as solution 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 Thumbs Up.

     

  • gopher1 Profile Picture
    8 on at

    @WarrenBelz 

    The valid output of 

    DataCardValue_Authors.Selected.ID

    is 2 in this case, since there are only two entries in the Authors List and it returns the last ID of the selected Authors.

     

    I don't quite understand what you mean. The Authors List only has the columns ID, AuthorName (renamed from Title) and AuthorEmail.

  • WarrenBelz Profile Picture
    156,736 Most Valuable Professional on at

    @gopher1 ,'

    What are the Items of DataCardValue_Authors?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard