I'm a beginner in Nav. I'm working with Nav 2009 R2. I have two checkboxes in a form (male, female). Once you select a determined gender,for example, female, I want to disable the male checkbox. If you then uncheck the female checkbox I want the male checkbox to be enabled again. I hope that I expressed myself clearly because I'm new at this
Thanks in advance for your help!!
Would you not be better using an option box rather than boolean? So the user can select just one of a list?
Thanks for your reply! Yes I thought of that but according to the specifications of the project that I'm working on I have to use two checkboxes. That's how the boss wants it
If you just need disable when other checked you should use Total 4 Boolean Variables :
As like Your Example : one each For MALE(bool1) And Female(bool2)
And Other two For Editable property for Each ..... And Write Some Code in Onvalidate Triggers Like..
IF bool1 THEN
bool4 := FALSE
bool4 := TRUE;
What do you mean by:
And Other two For Editable property for Each ..... And Write Some Code in Onvalidate Triggers Like..???????????????
I defined the checkboxes with two boolean:
Male type boolean
Female type boolean
Then I defined two global variables:
v_male (type boolean)
v_female (type boolean)
I then wrote the following code in the OnValidate trigger for each checkbox:
OnValidate trigger for Male checkbox:
IF v_maleTHEN Female:=FALSE
ELSE Female:= TRUE;
OnValidate trigger for Female Checkbox:
IF v_femaleTHEN Male:=FALSE
ELSE Male:= TRUE;
But it doesn´t seem to work because when I check one of the options both of them are checked
I'm a beginner so I really don't know what I'm doing wrong
Thanks for all your help!
That is my My Mistake .. Sry you are using 2009 R2 i havent seen That .
But if it is Classic Client Then My suggestion would be like you have created two check Boxes right ..
Select First checkbox (see properties let's say SourceExp Male ) then right click select CALCode
If Male then
Female := False
Male := False;
female := False;
Similarly Select Second CheckBox (see properties let's say SourceExp Female ) then right click select CALCode write code
If Female then
Male := False
Let Me Know if you got result
Thanks for the help! Works perfectly fine!!
At the end you only need the two booleans provided by the checkboxes and write the code in the OnValidate trigger for each checkbox.
Thanks once again for your time!!
You can also check this post.
Thanks Shyam!!! Very useful