Defining Variables with Screens

Many of the screens in Setup Factory can receive input from the user. Whether that input is in the form of text entered in an edit field, or the checked or unchecked nature of a check box, it needs to be stored in a variable so it can be used by rest of the installer.

For example, the default User Information screen prompts the user to enter their name and their company's name into a pair of edit fields, and assigns the value of each field to the variable of your choice. The text that the user enters into each field is the value that will be assigned to the corresponding variable.

Another example: a variable is required for each check box on a Check Boxes 12 screen. When the user selects a check box, the value "true" is assigned to the corresponding variable. If the user deselects that check box, the value "false" is assigned to the variable instead. In other words, each check box has a variable that is set to either true or false to represent whether the check box was selected or not.

For every item on a screen that can receive user input, there is a field where you can provide the name of the variable you want the result to be stored in. If you provide the name of an existing variable, the result will overwrite that variable's contents. If you provide a new variable name, a new variable will be created automatically. The result of the user's input will be stored in the variable you provide, regardless of whether that variable already exists.

TIP

 

You can display the contents of a variable on a screen by including the variable name in the screen's message text.

 

See Also: Variables, Defining Variables with Actions, What Can You Do With Variables?