Use JavaScript For Field Options

You can specify the options that appear in fields on a profile screen by writing custom JavaScript.
cim1265
You can specify the options that appear in fields on a profile screen by writing custom JavaScript.
To use a JavaScript to populate field options
  1. Select a field to modify or add a new field.
  2. If you are adding a new field, select the attribute that is associated with the field from the list box.
  3. Select one of the following styles:
    • Check Box Multi-Select
    • Dropdown
    • Dropdown Combo
    • Multi-Select
    • Option Selector
    • Option Selector Combo
    • Radio Button Single-Select
    • Single-Select
    The fields in the Field Properties dialog change based on the style selection you make.
  4. Select JavaScript in the Source of Selection Options field.
    An additional field, Selection Options (JavaScript), appears.
  5. Enter JavaScript to provide the options for the field in the Selection Options (JavaScript) field.
    The JavaScript you enter must contain a function with the signature "function getOptions(FieldContext)" and return a pipe delimited string of options. If the option has separate display and storage values, enter as "storage-value;display-value"
    For example:
    function getOptions(FieldContext) { return "1;one|2;two|3;three|4;four"; }
  6. Specify one of the following values in the Preserve Non-Options field:
    • Yes -- Existing values that do not match one of the valid options are preserved.
    • No -- Users must select a value from the pre-defined option list. Existing values that do not match an existing value are not preserved.
  7. Specify values for the remaining required fields.
    For information on required fields, see the User Console online help.
  8. Click Apply, then click OK.
Identity Manager
saves the current field properties