Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1273 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi!

Hope that someone can shed some light on the following issue:

I have two checkboxes from the same table. First one is a text field with Auto-enter calculation which says if Checkbox 2 contains certain value, Checkbox 1 should be empty/unchecked: Case ( Checkbox 2= " EXPELLED"; ""). It works fine.

However if I decide to override Auto-enter calculation, meaning having both Checkboxes checked and then uncheck Checkbox 2 making it empty, Checkbox 1 gets also unchecked although Checkbox 2  in fact does not contain value "Expelled" defined in the calculation.

What am I missing?

Any help is appreciated!

Posted (edited)

I think you want to do something like:

 Case ( Checkbox 2 = "EXPELLED" ; "" ; Self )

or perhaps more simply:

 Case ( Checkbox 2 ≠ "EXPELLED" ; Self )

However, this assumes that the Checkbox 2 field can either contain the text "EXPELLED" or be empty. Usually, a checkbox field can contain several values, and if you want to test for the presence of "EXPELLED" among other possible values, your test will fail. OTOH, if you're using the field as a Boolean (on/off) type, then it would be much more convenient to use the numeric value of 1 instead of the "EXPELLED" text value.

 

Edited by comment
  • Thanks 1
Posted

HI!

Tnx so much for your answer. After some testing I went with the first solution you proposed. It's not precisely what I was aiming for but it did open some other possibilities which nicely fit into my plan.

BTW... (not related to the current issue)....is there a way FM can recognize hidden status of an object or a field that can be used in a script?

Something like IF Object 1 is hidden THEN.....

Tnx once again!

Posted
46 minutes ago, Sinky said:

is there a way FM can recognize hidden status of an object or a field that can be used in a script?

Yes, there is: isObjectHidden is one of possible parameters of the GetLayoutObjectAttribute() function. Alternatively, you could use the same condition as the one used to hide the object. Or, if you want to avoid evaluating the same thing twice, you could set a global variable to the result and use this both to hide the object and in your script.

--
P.S. Please post unrelated questions separately.

 

This topic is 1273 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.