- Open NetIQ Designer and create a PRD(Process Request Definition) from the template TemplateNoApproval
- Set the status to Active
- In the Request form, add a field of data type String and control type StaticList and name it say, Cities.
- Navigate to the Form tab of the PRD, you will see 4 sub-tabs under the Form Controls Section Fields, Actions, Events and Scripts
- Click on the Scripts tab
- Click on the ‘+’ button to add a script
- Change the type of the script to external
And Click on the Retrieve button to fetch the contents of the script.
- Click on the Fields Tab and select the field added in step 3 and open the properties view.
- Select the events property and click on the icon
- Add an Event by clicking on ‘+’ sign and select the event as onLoad
- Click on the ECMA Script icon in the Action expression and select field methods from the ECMA script objects
- Under field methods select setValues and enter the following
- Click Check syntax and Click OK on the confirmation message.
- Click OK to close the ECMA script editor
- Click OK to close the Field Events dialog
- Save and Deploy the PRD from Designer.
- To Test Make a Process Request from the Work Dashboard and check that the field has the values populated in the drop-down box.