If I have two checkbox
[ ] Yea
[ ] No
How to save in tinyDB only what user can choose?
I tried this, it’s saving both checkboxes, the chosen one and the empty one.
If I have two checkbox
[ ] Yea
[ ] No
How to save in tinyDB only what user can choose?
I tried this, it’s saving both checkboxes, the chosen one and the empty one.
Instead of using like this, why don’t you use global variable to catch and use it here.
I mean, when check box 1 checked
Set variable 1 to get check box value
But i feel it works fine with your blocks. It accepts only what we suggest
May be i am worng… If you set empty text box, it will will store like that only
Yes, you can try like this it accepts only checked item
Do It Result: {"1":[],"2":["Box1"],"3":["Box2"],"4":["Box3"],"5":["Box1","Box2"],"6":["Box2","Box3"],"7":["Box1","Box2","Box3"]}
@Still-learning @Douglas_Maueski
Why not use When Any Checkbox.Changed
event?
An alternate way below
Also @Douglas_Maueski as mentioned below the marked blocks are used to remove the selection from the list if user unchecks the box before saving the selection. You can remove the blocks if you want
AIA file if needed
CheckedTextBoxEntries.aia (3.2 KB)
Yeah possible… but the fact is,i tried with limited events and blocks
Sorry but I didn’t get you. I have just used the available events created for that specific purpose for example directly using when any Checkbox.Checked
instead of creating a list of all check-boxes and then looping through them to validate if they are checked or not and I think, using the mentioned event instead of loop would be more optimises way to do current task
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.