4cardsman

Funky Behavior Hiding Field Labels

Discussion created by 4cardsman on Jul 1, 2018
Latest reply on Jul 2, 2018 by keywords

To overcome the inability to dynamically resize objects, I created several overlapping layout objects, including fields, that hide based on field contents.  The fields themselves follow the hiding logic with no problem, but the labels do not.  Sometimes they hide and sometimes not.  I tried directly applying the hide logic to the labels, with no change.  I finally worked around the problem by making text objects to replace the labels and applying the hide logic to them, which works.  After struggling with this for way too long, I created a truth table in the Data Viewer and a test file.  Here is the hide logic for the first field:

IsEmpty (Test::First) or

not (IsEmpty (Test::First) xor IsEmpty (Test::Second))

Here is the hide logic for the second field:

not (IsEmpty (Test::First) xor IsEmpty (Test::Second)) or

IsEmpty (Test::Second)

As you can see, I tried reversing the order in the second field with no change.  The desired outcome is for both fields and their labels  to hide if both fields are empty or if both have a value, and for the empty field and its label to hide if one field has a value.  Here are the results of my test:

Only first field has a value: Second field hides, but its label shows

Only second field has a value: First field hides, but its label shows

Neither field has a value : Both fields and their labels hide

Both fields have a value: Both fields and their labels hide.

Outcomes