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 / how to use the gallery...
Power Apps
Answered

how to use the gallery to collect data

(0) ShareShare
ReportReport
Posted on by 166

here are  several rows data get from the data source in the sharepoint list,the data source is that i get from excel.

now i want use the checkbox to pick the data,is it possble to upload the data with checkbox mark into sharepoint or i can collect the one mark with checkbox and go to another screen.

 

Ricky24_0-1663327410190.png

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Ricky24 

    I assume that you want to add selected new Items to a SharePoint list based on a gallery with Items from an Excel table.  You can do this by using the Collect function.  In the screenshot, there is a list of names from a datasource like Excel.  The TextInput boxes have a default property for ThisItem.FirstName and ThisItem.LastName.  The checkbox has as its OnCheck property Collect(splist,{First: txtFirst.Text, Last: txtLast}) and an uncheck property 

    Remove(splist, {First: txtFirst.Text, Last: txtLast}) . The splist has two columns named First and Last)

    The result is shown in the datatable on the right side. As you can see, the data from the Excel file is added to the splist by checking the checkbox in the gallery._9.jpg  When the checkbox is unchecked, the names are removed from the splist. 

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Ricky24 

    I assume that you want to add selected new Items to a SharePoint list based on a gallery with Items from an Excel table.  You can do this by using the Collect function.  In the screenshot, there is a list of names from a datasource like Excel.  In that table, the names are called LastName and FirstName.   The TextInput boxes in the gallery have a default property for ThisItem.FirstName and ThisItem.LastName respectively.  The checkbox has as its OnCheck property Collect(splist,{First: txtFirst.Text, Last: txtLast}) and Uncheck property 

    Remove(splist, {First: txtFirst.Text, Last: txtLast}) . The splist has two columns named First and Last.  

    The result is shown in the datatable on the right side. Its Items property is splist.   As you can see, the data from the Excel file is added to the splist by checking the checkbox in the gallery._9.jpg  When the checkbox is unchecked, the names are removed from the splist. 

  • Ricky24 Profile Picture
    166 on at

    thanks for your reply.

    and if i don't want to split the text,just want to collect the left one side some rows,how to achieve it.

    I add a checkbox,change the oncheck code to :Collect(Gallery3.Selected.Checkbox1),it not works.

    Ricky24_0-1663402880832.png

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Ricky24 

    I don't understand what you are trying to do.

  • Ricky24 Profile Picture
    166 on at

    Ricky24_0-1663470573595.png

    Thanks for your repay, my purpose is here are lots of rows in the left side ,so i insert a checkbox in the left Gallery to pick the item i want.so when i click the checkbox,there will be a collect function work,and show the item which I have picked on the right side, is it possible to update this item to share point with a checkbox?

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard