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 / HELP! Gallery Each Lis...
Power Apps
Answered

HELP! Gallery Each List to SharePoint column

(0) ShareShare
ReportReport
Posted on by 438

I've registered classes using the Gallery, but I'd like to submit the form to a SharePoint list. For each item in the course list that students have selected in the Gallery, I want to send that class's course to the corresponding column in the SharePoint list.

 

Please check attachment have more details. 🙂

Screenshot 2023-11-03 235833.png
Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @dylandavis09 , Please help how do you make sure that student has selected the course from gallery? I mean which control you are using to allow student to select the courses from gallery? Or whatever courses are shown in the gallery , you want that to pact to SP list?

     

    If you can help me with above question, then I can help you building the logic.

     

    OR

    EDITED

    If you are saying that the gallery will have all the courses which is already selected student and you want to just patch those in single item in SP list then you can use Index function.

    ClearCollect(col_SelectedCourse, Gallery.AllItems);
    Patch(
     'Register Course Classes',
     Defaults('Register Course Classes'),
     {
     'Full Name': User().FullName,
     '1st Course': Index(col_SelectedCourse, 1 ).ColumnName,
     '2nd Course': Index(col_SelectedCourse, 2 ).ColumnName,
     '3rd Course': Index(col_SelectedCourse, 3 ).ColumnName,
     '4th Course': Index(col_SelectedCourse, 4 ).ColumnName,
     '5th Course': Index(col_SelectedCourse, 5 ).ColumnName
     }
    )

    Check this: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-first-last

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


     

  • dylandavis09 Profile Picture
    438 on at

    @ANB hi again, yes, I want to add the selected list items to the SP list in column the 'Register Course Classes' from the Gallery.

     

    When a student clicks the '+' icon, the item will be added to another gallery for collection. Then, when the student is ready to submit, the gallery list will be sent to the SP list, with items ordered by their IDs in each column.

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @dylandavis09 , I have edited my previous response. Please check the suggestion.

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


     

  • dylandavis09 Profile Picture
    438 on at

    You got it, and I just copied and pasted. Some of them have changed for SP data, and some haven't. Please take a look at my screenshot; it still shows an error. I must have done something wrong with that. 🙂

    Screenshot 2023-11-04 013728.png
  • dylandavis09 Profile Picture
    438 on at

    @ANB , it's been updated, and it's working now. However, there's still a problem – it only shows the course numbers without the course titles. Let me show you the screenshot.

    Screenshot 2023-11-04 014204.png
    Screenshot 2023-11-04 014216.png
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    @dylandavis09 , What is the data source of Gallery where you show all courses? If it is the collection then can you show me the collection with its output and column name screenshot?

     

    Thanks,

    ANB

  • Verified answer
    ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @dylandavis09

    If you want to patch both the ID as well as the name of course this should be the code:

    Index(colRegistrationClasses,1).Title5_8.Text & Index(colRegistrationClasses,1).Title5_9.Text

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


  • dylandavis09 Profile Picture
    438 on at

    It's WORKED. Thank you so much for your help a lot.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard