Hi , I have a view with checkboxes for monday,tuesday,wednesday,etc
when i save the view (create the item ), i want a total of the number of days checked . ie if the user selected monday and wednesday i would have the value 2 stored in a data label . How can this be done ?
Solved! Go to Solution.
I have created a simple way of doing this:
1. I first create an expression using the datalabel (toy can find the "+" in the operator section under operators):
Please note that the datalabel has to be a Number and set to 0.
2. I used a Multi-Checkbox List to populate my data (I used static data)"
3. On my button rule, I have a for loop on the Multi-Checkbox List, which will count all of the checked boxes, followed by displaying the result on the label once the button is clicked. I used the "set a control's property" action to do this. See the next screenshot of how the rule was configured.
4. "set a control's property" configuration:
I ended it of with disabling the checkbox list control as if the checkboxes would be clicked/unclicked afterwards.
Hope this helps :). If you have any questions or need assistance, please dont hesitate to ask.
I had the same issue. The way I did it, is it calculates everything after the button is clicked that way if the user unchecks/checks before the button is clicked, it does not count it. So it essentially counts the already checked check boxes at the time of the button click.