How do I hide an object based on a value? I only know how to do it if a value is empty (if Isempty ..)
Let's say,, I have three values in a field and I want to hide an object if two of the three values are chosen.
if ( table::field = "A"OR table::field = "C" )
if ( table::field = "A"
OR table::field = "C" )
If the field has "B" or is empty, it will NOT be hidden. Otherwise, it hides with the other two conditions.
This presumes you allow selection of A, B, or C. If the field has "D", for example, it will also not be hidden.
Think in terms of what you want or don't want to 'show'.
Sent from miPhone
ValueCount ( FilterValues ( Table::Field ; List ( Value1 ; value2 ) ) = 2
Beverly is assuming only one value in any given field.
I am assuming that you might have a check box formatted field where you want this hide to happen if 2 specific check boxes are selected. This also works if you have a return separated list of values and want the hide to happen if 2 listed values are present in the field.
The formula you enter has to evaluate to True or False. If True, the field is hidden. The formula can be simple or complicated. But if it includes data in fields, don't forget that these fields have to be available in the context of the layout where the field will hide.
I pretty much assumed there might be other values. There are variations to handle any number of combinations of what can be entered. The idea is to test for what should be hidden in the formula for that box.
Field = "value"
Will only be true if "Value" is the only data in the field. It won't be true if "Value" is part of a list of values entered into in the field. I'm not saying that your assumption is wrong, just pointing out that our two responses come from very different assumptions and it's up to viggip to clarify as needed.
The assumption that any one answer is/was based on assumption is false.
Sorry, but all answers are based on assumptions. And that's not an assumption.
I would use the formula—
table::field ≠ "a"
With this approach you are basically nominating the one value which will allow the object to be visible, so with anything else it will be hidden. It saves you having to specifically nominate all possible values, and thus will not fail if down the track you add a fourth or further value to the field.
Thank you ! I think the last answer is the one.
Bring up the inspector for the object you wish to hide by double clicking the object. Within the inspector you will see "Hide object when".
Then just type the value ie table::field > 6
Retrieving data ...