3.1 Creating Custom Request and Approval Forms

By default, the Identity Governance provides a default form set. This form set consists of request and approval forms with a set of predefined fields. You can use the default forms for requesting access to applications and permissions. However, when more complex forms are required, you can create a new form set and add custom fields in the request and approval forms using the Form Builder. For more information on creating a new form set, refer to the "Creating Custom Forms for One or More Permissions and Applications" section in the Identity Governance and Identity Governance as a Service User and Administration Guide on the Identity Governance and Administration Documentation page.

3.1.1 Creating a Custom Request Form

  1. From Identity Governance, launch the request form associated with a permission or application.

  2. In Form Builder, drag and drop the required component into the workspace to add new fields on the form. For more information, see Form Components.

  3. Define the properties of the component, then click Save.

  4. Click on the Home screen.

The following example provides step-by-step instructions for creating a request form that allows the user to request for a laptop. The options on the form include the laptop type, color, and the reason for placing the request.

  1. From Basic Components, drag and drop the Select component into the workspace.

  2. On the Display tab, type Laptop Type in the Label field.

  3. On the Data tab, verify that the selected Data Source Type is Values.

  4. In the Data Source Values, enter the following values in the Label field:

    • Dell

    • Lenovo

    • HP

    • Mac

    HINT:Click Add Another button to add new label and value fields.

  5. (Optional) Verify the Laptop Type drop-down list functions correctly in the Preview area.

  6. Click Save.

  7. To add choices for laptop color, drag and drop the Select Boxes component into the workspace.

  8. On the Display tab, type Choice of Color in the Label field.

  9. On the Data tab, enter the following labels in the Values field:

    • Grey

    • White

    • Black

  10. Click Save.

  11. (Optional) To modify the Reason component (present in request form by default), click and configure the settings as required.

  12. Click to preview the form.

  13. Click on the Home screen.

3.1.2 Creating a Custom Approval Form

When you customize a request form, you may also need to add the corresponding controls to the approval form to facilitate data flow. For example, if you have added Laptop Type and Choice of Color fields to the “Request for Laptop” request form, it requires that you add these fields in the approval form and configure the flowdata. Adding flowdata allows you to pass the user input from the request form to the approval form.

To add flowdata to the approval form:

  1. Launch the approval form associated with the “Request for Laptop” permission in Form Builder.

  2. To pass the user input for laptop type from the request form to the approval form, perform the following actions:

    1. From Basic Components, drag and drop the Select component into the workspace.

    2. On the Display tab, type Laptop Type in the Label field and select the Disabled check box to disable the user input in this field.

    3. Click Save.

    4. Open the JS Editor and look for the following function:

      function laptopType_CustomDefaultValue () {}
      function laptopType_CalculateValue () {}
    5. Configure the custom default value as:

      function laptopType_CustomDefaultValue () {value = context.flowdata.laptopType;}
      
      function laptopType_CalculateValue () {}

      HINT:You can use the IG Request option to add the context.flowdata.laptopType; flowdata. Click IG Request > Flowdata, and select Laptop Type.

    6. Click .

  3. To pass the user input for choice of color from the request form to the approval form, perform the following actions:

    1. From Basic Components, drag and drop the Select Boxes component into the workspace.

    2. On the Display tab, type Choice of Color in the Label field and select the Disabled check box to disable the user input in this field.

    3. On the Data tab, add the following labels in the Values field:

      • Grey

      • White

      • Black

    4. Click Save.

    5. Open the JS Editor and look for the following function:

      function choiceOfColor_CustomDefaultValue () {}
      function choiceOfColor_CalculateValue () {}
    6. Configure the custom default value as:

      function choiceOfColor_CustomDefaultValue () {value = context.flowdata.choiceOfColor;}
      
      function choiceOfColor_CalculateValue () {}

      HINT:You can use the IG Request option to add the context.flowdata.choiceOfColor; flowdata. Click IG Request > Flowdata and select Choice of Color.

    7. Click .

  4. Click to preview the form.

  5. Click on the Home screen.

NOTE:

  • You can use the Simulate Request Workflow option to review the form fields by simulating the requester and approver action.

  • In the Form Builder, you can create inline scripts that can be used as helper functions. Be aware, however, that since these inline scripts are published to the global javascript context, unexpected results may occur. One example of this is in the compare to draft to published area, where one has two forms up at the same time. In this case, both forms will end up sharing the same inline function, even if the definition of the function was different between the draft and published form.