Previous Topic: Environment VariablesNext Topic: List Variables


Business Object Variables

Business object variables represent a CA SDM object, such as an issue or a request. To access an object, you need to start with the variable name, followed by a period (.), followed by whatever attribute names you want to display. For example, on an issue where, by convention, the object is represented by the variable args, you can display the description, the open date, the assignee's phone number, the number of activities on the issue, and the description of the first activity, as shown by the following:

$args.description
$args.open_date
$args.assignee.phone_number
$args.act_log.length
$args.act_log.0.description

You can use braces to delimit the variable name if it is not surrounded by white space. For example, $foo bar and ${foo}bar are both valid. You can also use the variable args to access non-attribute values (for example, $args.KEEP.name as described in Supported Operations).

It is possible that a non-attribute variable may not be defined. For example, it may be possible to get to a form from two different places, only one of which provides a value for $args.KEEP.foo. You can provide a default value for a $args reference with the following syntax, where the string after the colon is substituted for the reference if variable is undefined:

${args.variable:default}
Time Zone Date Variables

Time zone date variables are a special case of business object variables. They provide a means to convert universal dates (UTC) represented as integers to string dates adjusted for the time zone of the user's browser. The variable for representing integer dates is:

$args.attr_name_INT_DATE

Example: $args.open_date_INT_DATE

Factory Data Variables

Factory data variables are a special case of business object variables. A factory data variable is replaced by information about a referenced object. There are seven such variables available:

$args.attr_name.COMMON_NAME

The common name (externally readable string) of the table referenced by the attribute. For example, on the Request Detail form, the value of $args.assignee.COMMON_NAME is the assignee's combo name (“last, first, middle”).

$args.attr_name.COMMON_NAME_ATTR

The attribute name of the common name in the table referenced by the attribute. For example, on the Request Detail form, the value of $args.assignee.COMMON_NAME_ATTR is “combo_name”.

$args.FACTORY_attr_name

The name of the factory associated with the specified attribute. For example, on the Request Detail form, the value of $args.FACTORY_assignee is “agt”.

$args.LENGTH_attr_name

The maximum length of the attribute. For example, on the Request Detail form, the value of $args.LENGTH_summary is 240.

$args.attr_name.REL_ATTR

The rel attr (foreign key) of the attribute. For example, on the Request Detail form, the value of $args.assignee.REL_ATTR is the value of the assignee's ID field.

$args.attr_name.REL_ATTR_ATTR

The attribute name of the rel_attr in the table referenced by the attribute. For example, on the Request Detail form, the value of $args.assignee.REL_ATTR_ATTR is “id”.

$args.REQUIRED_attr_name

A string, either “0” or “1” indicating whether the referenced attribute is required.

$args.attr_name.SELECTIONS

A list of valid selections for attr_name. This value is an empty string if attr_name is not a reference to another table, or if the size of table referenced by attr_name exceeds the value of the configuration file property SelListCacheMax. Otherwise, the SELECTIONS variable is a string containing the common name and rel attr of all the entries in the referenced table. Successive values are separated by the string “@,@”, so the variable's value has the form:

"cname1@,@rel_attr1@,@cname2@,@rel_attr2"

$args.factory_SEL_UNDER_LIMIT

A string, either “0” or “1”, indicating whether the current number of rows in the table corresponding to factory is less than the value of the configuration file property SelListCacheMax. This variable is deprecated in favor of the SELECTIONS variable, which should be used in all new forms.

Factory data variables containing a dotted reference (COMMON_NAME, REL_ATTR, and SELECTIONS) can be used with a dotted reference of any length. For example, on a Request Detail form $args.assignee.organization.COMMON_NAME is replaced by the external name of the assignee's organization.