Skip to main content
Nintex Community Menu Bar
Solved

k2 view increment counter

  • April 20, 2021
  • 3 replies
  • 170 views
  • Translate

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 ? 

Thanks

 

Best answer by Prineel

@nigel_mark_bill,

 

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.

 

Kind Regards

Prineel

 

 

View original
Did this topic help you find an answer to your question?

3 replies

  • 212 replies
  • Answer
  • April 20, 2021

@nigel_mark_bill,

 

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.

 

Kind Regards

Prineel

 

 

Translate

Hi Prineel , thanks for your complete solution on this , I will try it out . Actually I more or less got by by using a data label and an expression that adds 1 . It works ok , but my solution does not handle the case of the user checking / unchecking multiple times . Thanks a lot , I will give it a go,
Translate

  • 212 replies
  • April 22, 2021

Hi @nigel_mark_bill,

 

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.

 

Kind Regards

Prineel

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings