Announcements
Hi all,
I would like to create a checklist that people can randomly check line(s) or row(s) on it. I have already connected a gallary to the data source and populated the information that I need for each line. How can I add a checkbox at the end of each line, then convert the checked answers to "Yes"/"No" for checked line(s) in the data source? Also, is it possible to add a short comment section for each line?
Thank you so much!
@Yin,
Do you have a column (Field) in your datasource that reduces to true or false? Does your datasource have a long text type field for your comments. Without these fields, you can add the controls but nothing in them will be saved for the next session.
@Drrickryp
Thanks for the reply. I will add two columns, one for True/False, one for the short comment. After that, how should I add the editable checkbox to the gallery?
Thank you so much,
Yin
Hi @Yin,
You would use a Patch() function to do it. There are two ways to collect the data from a gallery. It could be done by triggering the Patch each time something changes in the control or you could do it by adding a button or icon to the row and Patching both controls at the same time. I will describe the latter way. Say your two controls are named Checkbox1 and Textinput1. The OnSelect property of the patching icon would be
Patch(yourdatasource, ThisItem, {truefalsecolumnname:Checkbox1.Value,yourcommentcolumnname:Textbox1.Text})
I am not familiar with patch function. Will spend some time on it. For adding the button or icon that you mentioned as the 2nd way, do you mean add it to each row? If so, what is the efficient way to do that? Because my datasource has about 1000 rows.
Thank you so much for your quick reply!
You click on the litle pencil in the upper left corner of the gallery and then insert the controls to the first row. They will then populate down the gallery into all of the rows. FYI, the Patch() function is one of the most versatile and misunderstood functions in Powerapps. If you want to master it, I would start with one of Shane Young's videos (@Shanescows) on the patch function at https://www.youtube.com/watch?v=gX5q_V3U8-s.
BTW, what I am suggesting to you is an atypical way to use a gallery and you probably won't find examples of it that easily. Most commonly, you navigate to an Edit form and make changes to a record from there.
I have already added a column for the checkbox in the original datasource. If adding a control in the gallery for each row, do I have to link the control to the column for each row in order to save the checkbox data?
In the Default property of the control, type in ThisItem. and all of your columns will show up. Choose the correct column for the control from the list. So for example, if you click on the checkbox control and go to the Default property and type in ThisItem.MyCheckboxColumnName it will show you what the current value in that column is for that record. (substitute the checkbox column name for MyCheckboxColumnName) You don't have to specifically link them because the Patch function will take the value of the control and apply it to the field. That is what it does.
You replies are really helpful. I will play with them to see if I can make it.
Thank you so much for your time and the great help!
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 352 Super User 2026 Season 2
M Bilal Khan 323
Mohsin Ali 226