KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Applying a command to several form objects using the "*" parameter
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: January 11, 2002

All the commands that belong to the Object properties theme can accept the * character as first parameter. In versions earlier than 4D v6.0, the first parameter was the name of the variable to which the command would apply. Starting with version 6.0.x, the first parameter can be the * character. If that character is passed, the second parameter designates the object name of the object that will be affected by the command.

The use of the object name with these commands can prove very useful, especially when it is combined with the @ character.

For example, given 3 variables in a form whose variable names are Var1, Var2 and Var3, if you want to set these variable to Invisible, you would write:

SET VISIBLE (Var1; False)
SET VISIBLE (Var2; False)
SET VISIBLE (Var3; False)

Let us assume that the object names for these variables are Variable1, Variable2, and Variable3. The following statement will have the same effect on these variables as the code described above.

SET VISIBLE (*;"Var@"; False)

However, since this statement will set to invisible any form object whose name begins with "Var", you would have to be more careful about the object names used in the form.