Unticking a check box



I have a database containing a person's height and weight. There is then a list of risk factors for a particular problem. If the entered height and weight gives a BMI over 35 then the 'High BMI' in the risk factors multiple choice list is ticked.


However, if I then update the record and the weight has gone down so that the BMI is now below 35, how do I make Ninox untick the checkbox?


My code so far is:


if 'Weight (kg)' / ('Height (m)' * 'Height (m)') >= 35 then
'Risk factors' := 5
'Risk factors' := ?? What do I put here to untick the box?


Thanks so much.

Ninox Profile

@Dan,   is your "list of risk factors" a multi-choice box?   I suppose you could create a loop to process the array of "chosen" values and remove the risk factor.     That said, a more user friendly UI would be to move each risk factor out into it's own field and display accordingly. 

I do this in an application that uses World Health Orgainziation (WHO) reference data to help identify malnourished youths. 


Hi, thanks for your reply.

Yes, it's currently a multiple choice box. If there is no easy way of unticking 'high BMI' within that box, then your suggestion of moving them all into their own 'yes/no' boxes might be the best way. Thanks.


Ninox Profile

@Dan.. Yes you can "uncheck it" .. You will just have to loop through and rebuild it each time.. which.. in my opinion is not a good strategy .. Pull them out into their own fields.. and use the "Display Field Only If"  trigger to display the field.  Here .. you can use styled text.. images.. swtiches.. whatever to display the warning.. 

I did a styled box.. the value was in Green, Yellow, Red depending on value.. 

Sounds like a great app!  


Thanks Mconneen. I've put them all in their own fields - works fine now. Thanks for your advice!


Ninox Profile

You bet Dan!   Here is a sample from one of my apps..