cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

How to save Checkboxes entries to SharePoint List Column

Hi everyone,

 

Would like to seek your help on how to save the selected Checkboxes values to SharePoint List Column using a button. It should be save as a different rows entry , for sample below, the sharepoint list should have 1 row that says Monday, January 18,2021 and the other row will have Wednesday, January 20,2021 after clicking submit. 

 

ssssss.JPG

 

 

SharePoint Lists

aa.JPG

 

I managed to do this but directly from the Checkbox OnSelect property but I want this only to be saved after clicking submit button.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@Champ14 

So if it is a single line of text, then your formula should be:

CountRows(Filter('Tracker', 'Selected Day' = Checkbox2.Text))

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

7 REPLIES 7
Super User III
Super User III

@Champ14 

Can you expand on your scenario?  Are your checkboxes in a Gallery or are they separate controls on your screen?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Super User III
Super User III

First of all, its not clear what control is holding the Dates which is besides the Checkboxes.

However assuming a DatePicker I suggest:
OnSelect of the Submit Button:

If(Checkbox1.Value,Patch(Applcication5,Defaults(Applcication5),
{Customer:DatePicker1.SelectedDate}));
If(Checkbox1_1.Value,Patch(Applcication5,Defaults(Applcication5),
{Customer:StartDatePicker.SelectedDate}))

 

Alternatively Create a Collection and Use ForAll and Patch:

1. OnCheck of the Checkboxes

   Collect(Coll,{Dates: DatePicker1.SelectedDate})  

 

2. OnUncheck

   Remove(Coll,LookUp(Coll,Text(DatePicker1.SelectedDate) exactin Dates)) 

 

3. OnSelect of the Submit Botton:

  ForAll(Coll,Patch(SharePointList,Defaults(SharePointList),{ColumnInSharepointList :Dates}))

 

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Super User III
Super User III

@Champ14 

On further review of your picture, I see the bottom check is not aligned like the rest, so I will assume that these are all separate checkboxes.

If so, then on your Submit Button OnSelect action formula, set the following:

Collect(yourSharePointList,
    ForAll(Filter([checkbox1, checkbox2, checkbox3], Value.Value),
        Patch(Defaults(yourSharePointList),
            {yourSharepointColumn: ThisRecord.Value.Text}
        )
    )
)

This will create a writeable record (with the Patch to the defaults of your list) with the text that is displayed in the checkbox for each checkbox that is checked and then write them all at once to the SharePoint list.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Thank you Randy, this works!! You have a very sharp eyes! Sorry, didint managed to include that info in my posts.

Only last thing, I am wondering how I can show the total number of the entries are already in the SharePoint Lists, I am planning to show it to the side of the selection, I have tried this below but doesnt work.

CountRows(Filter('Tracker', 'Selected Day'.Value = Checkbox2.Text))

TotalEntries.PNG

Super User III
Super User III

@Champ14 

So tell me more about what 'Selected Day' is?  Is that a column in your list?  If so, then what type of column?  Is that the one you are writing from the last formula I provided?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Frequent Visitor

Hi @RandyHayes ,

Thanks for your response.
Yes, that is a column in a sharepoint list where the entries submitted before was being saved. I need to show how many same entries are already there by counting the number of rows with the same entry. The column is a Single line of text.

Super User III
Super User III

@Champ14 

So if it is a single line of text, then your formula should be:

CountRows(Filter('Tracker', 'Selected Day' = Checkbox2.Text))

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,716)