Using automatic variables

Alloy Navigator offers two types of variables: user-defined (declared) and automatically created (automatic). For details on using declared variables, see Using declared variables.

Automatic variables always exist when you are configuring the programming of an Action, Trigger, or Function, but they are unavailable in the scope of top-level operations (the outer-most scope). Two operations, Create Object and Act on Related Object, have their own "inner" scope. For inner scopes, Alloy Navigator makes available automatic variables, which contain references to objects from outer scopes. You can use automatic variables to access fields of the object from an outer scope in operations and conditional statements.

For example, when you need to create a Step for copying objects, the most of object data remains unchanged. This is where automatic variables enable you to access all fields of the original object as placeholders.

NOTE: Automatic variable names always begin with the dollar sign $. When you insert placeholders , you will find available automatic variables in the Variables category.