Customizing the User Console › Configuring Profile Tabs and Screens › How to Populate Field Options › Use JavaScript For Field Options
Use JavaScript For Field Options
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
- Modify a profile screen.
- Select a field to modify or add a new field.
- If you are adding a new field, select the attribute that is associated with the field from the list box.
- 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.
- Select JavaScript in the Source of Selection Options field.
An additional field, Selection Options (JavaScript), appears.
- 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";
}
- 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.
- Specify values for the remaining required fields.
Note: For information on required fields, see the User Console online help.
- Click Apply, then click OK.
CA Identity Manager saves the current field properties
Copyright © 2015 CA Technologies.
All rights reserved.
|
|