Fields
Fields are the core element of forms. They are the mechanism by which data gets communicated to and from the user. Fields offer options that affect the appearance or functionality of the field. Some of these are commonly used and others are used very infrequently. Some of these are specified as inline attributes in the <Field>
tag and others are specified as nested elements within the Field.
Field Attributes |
Description |
name |
Name for the field that can be referenced in code as the variable name in which the field's value is stored. accept As well as global attributes: accesskey |
displayName |
Label for the field; can be text or a message key. |
helpKey |
Tool tip help text; can be text or a localizable message key. |
|
Field datatype; influences the display widget used to display the field on a form. Specifying type="boolean" renders the field as a checkbox; specifying type="date" adds a calendar from which the date can be selected. |
multi |
Boolean indicating whether the field is multi-selectable. |
readOnly |
Boolean indicating that the field cannot be edited on the form. The value is displayed as text, not in an editable box. |
|
Boolean that, when true, prevents the field from being displayed on the form.
Attributes marked hidden are not included in the plan. You must manually add the includeHiddenFields property to the form to include the hidden fields in the plan. |
required |
Boolean indicating whether a value is mandatory for the field; required="true" marks the field with * on the form to indicate that a value is required, and prevents form submission without a value for the field. Example: |
postBack |
Boolean that, when true, causes the form to refresh when the field's data value changes, running any rules or scripts that run on form load. |
columnSpan |
Used when the section is configured with multiple columns; specifies the number of columns the field should span.
|
filterString |
Used for fields where type is a |
section |
Statically defined fields in a form's XML are defined within a section element, so any section attribute specified on those fields is ignored. However, the section attribute can be used to organize fields in an application or role provisioning policy or on a dynamically rendered form. Application and role provisioning policy forms do not have section elements, so the section attribute can be used to force fields to be grouped differently than the default (default is by application or by role). Example: These two fields are put on the form in separate sections, labeled "Important Items" and "Optional Items" respectively.
|
displayType |
Forces string fields to display as specified, used only for string fields. Valid displayTypes are: radio, combobox, textarea, and label displayType="radio" and "combobox" are used to override the default display format for permitted-values fields (radio is the default for 2 options while >2 options is rendered as comboBox by default). textarea is used to make a string field display as a text area instead of a regular entry field.
|
value |
Sets the default / initial value for the field. This can be overwritten on the form in most cases, as long as the field is not marked readOnly. This is used within sections of type="text" to specify the text to display For application or role provisioning policies, setting a value (whether with this attribute or through a nested <Value>, <RuleRef>, or <Script> element) prevents the field from being included on the form unless reviewRequired is specified since provisioning policies only collect values from a user that they cannot determine or calculate independently. In workflow approvals, value can be specified by string, rule, script, call, or reference (string is default). In reports forms, the value is a reference to the report taskDefinition's input parameter from which to retrieve the starting / default value for the field, for example, value="ref:applications". |
dynamic |
This attribute performs two separate functions: (1) For fields with an AllowedValuesDefinition, delays running of allowed values scripts / rules until the field is clicked, instead of running at form load, so it can make use of other data entered on the form instead of just data available on initial form load. Example: <Field name="fullName" displayName="Full Name" dynamic="true"> <Script> <Source> return (firstName + " " + lastName); </Source> </Script> </Field> Note: Field value recalculations for fields marked as dynamic are not processed on postBack if a value has been entered manually in the field, based on the assumption that if a user manually enters a value, they generally do not want that overridden by an automatic process. To override this behavior, manually clear the fields using a hidden script elsewhere in the form like this:
<Attributes> <Map> <entry key="hidden"> <value> <Script> <Source> boolean hidden = false; // Null out field – add condition here if desired form.getField("nickname").setValue(null); return hidden; </Source> </Script> </value> </entry> </Map> </Attributes> <Field displayName="Nickname" dynamic="true" name="nickname" type="string"> <Script><Source> if ("Robert".equal(firstName)) return "Bob"; </Source></Script> </Field> </Section> |
Field Attributes |
Description |
dependencies |
List (CSV) of other fields that must be evaluated before this field. |
reviewRequired |
Enables a default value to be assigned to the field while still including the field on the form displayed to a user. This enables the default to be edited. If reviewRequired="true" is not specified, the provisioning policy form fields with a default value (or value script / rule that returns a value) are omitted from the user-facing form and the default value is automatically used. |
authoritative |
Boolean that specifies whether the field value should replace the current value rather than be merged with it. Valid for multi-valued attributes only: |
Nested Elements within Field Elements |
Description |
Description |
Field description, used for XML self-documentation. Not displayed in user interface. |
Attributes |
Attribute map used to control field rendering, specific to the field type. The most common attributes are height and width which are usually specified for textarea fields and for entry boxes that need to be other than the default rendering size. Units for height and width are in pixels. |
Value |
Alternative to "value" attribute on <Field>. This is required when specifying complex datatypes such as Map or List. |
Script |
Script used to initialize the value of the field, alternative to the value element / attribute. Automatically created for fields whose value is set by script through user interface specification. |
|
Reference to a reusable rule for initializing field value. Alternative to <Script> (and value attribute). Automatically created for fields whose value is set by script through user interface specification. |
|
Specifies a set of values from which the user can select to assign the field value. Automatically created for fields with an allowed values property set to Value (with a list of values specified) through user interface specification. |
AllowedValuesDefinition |
Populates a list of values from which the user can select a value for the field. This field contains either a <Script> block that specifies the list programmatically or a <RuleRef> that points to a rule containing the beanshell for generating the list. Automatically created for fields with an allowed values property set to Script or Rule through user interface specification. |
ValidationScript |
Script used to examine and validate the field value entered by the user. The value entered is passed to the validation script in the variable named "value." |
ValidationRule |
Reference to reusable rule for field validation. This is the alternative to ValidationScript. |
OwnerDefinition |
Used only for application and role provisioning policies to determine the Identity to whom the fields should be presented. This enables specification of a RuleRef, script, a Value element or a Value attribute: Three special names exist that are translated by IdentityIQ into the appropriate Identity so an OwnerDefinition script is not required for them:
The user interface offers these options for setting field owners: Requester (sets OwnerDefinition to ""), Application Owner (sets to "IIQApplicationOwner"), Role Owner on Role Provisioning Policies(sets to "IIQRoleOwner"), and Rule and Script (save as OwnerDefinition with nested RuleRef or Script, as shown above). |
AppDependency |
Applies only to application provisioning policies as part of the ordered provisioning function; sets the value for a field based on the value of an attribute on another application on which it is dependent.
|