The HotDocs Computation Archive
Get Extra Help

0038 - Use Both HIDE and REQUIRE

Description:

How to both HIDE and REQUIRE the same variable.


• Code •

HIDE Necessary
IF Cubs != "Losers"
   SHOW Necessary
   REQUIRE Necessary
   GRAY Necessary
END IF

• Explanation •

This computation uses one variable of any type, called "Necessary".

In my example, I utilized HIDE, GRAY and REQUIRE. For this to work REQUIRE must be in the same condition as SHOW. By way of explanation, if I HIDE a variable, I do not need to REQUIRE it unless it is SHOWn. So by putting the REQUIRE command in the same conditional IF statement as the SHOW, the script will work.

Now if by chance the Cubs turn out to NOT be losers, then I will have a grayed-out variable in my dialogue that can be ungrayed if another condition within that dialogue is met.