Count checked boxes

hello
i have checked boxs for 2 items i make it as Group A and Group B i need to make count for how many checkboxes checked on group A and how many in B its seem to use list with for each loop but still didn't get how to do this any idea ?

Can you post a picture of the screen and the blocks you have? makes it easier to understand what you want

From what I understand from what your saying just create a global variable called something like NumberCheckedA and NumberCheckedB and set them to 0 .Then each time a group checks a box have it adds one to the NumberChecked variable. Or if its already checked and they uncheck it it removes 1 from the variable.

i need the count of checked boxes of hot and also for dry so how to spilt 2 groups

In your when any CheckBox.Changed box put an if statement to check if the component is either hot 1 or hot 2 or hot 3 ..... then an else section. That way if it sees a hot is changed it will add to the hotvalue else it will add to coldvalue. Also I would put another if statement saying if checkbox unchecked set hotvalue text to hot value text - 1 and same for coldvalue.

thanks for replay
this way i know im looking for some thing to do this without many " or " because hot and dry boxes will increase qty to be more than 50

You need to generalize this to lists, to avoid drowning in check boxes.

Here is a sample app ...

For Multiple textboxes do something like this if your doing it that way

Here is a generalized solution to the original problem, not that I would recommend it at this point ...
Capture

sum_checked.aia (3.5 KB)

By the way, now would be a good time for you to learn more complex structures like dictionaries and their JSON text representations.

1 Like

thanks it working well with me

@Joel @ABG THANKS FOR HELP

No Problem :slight_smile: