cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use the custom object to store allowed values

Use the custom object to store allowed values

You can easily use the custom object in order to store the fields used to populate drop down selection lists in provisioning policy forms, workflow forms, etc.

 

Step One: Create a Custom Object to hold your Allowed Values

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE Custom PUBLIC "sailpoint.dtd" "sailpoint.dtd">

<Custom name="AllowedValues">

  <Attributes>

    <Map>

      <entry key="Cities">

        <value>

          <List>

            <String>Austin</String>

            <String>Boston</String>

            <String>New York</String>

            <String>Chicago</String>

            <String>London</String>

          </List>

        </value>

      </entry>

      <entry key="EmploymentStatus">

        <value>

          <List>

            <String>Employee</String>

            <String>Contractor</String>

            <String>Vendor</String>

          </List>

        </value>

      </entry>

    </Map>

  </Attributes>

</Custom>

 

Step Two: Create Allowed Values rules that can pull the Allowed Values out of the Custom object and use in Provisioning Policies, or wherever they are needed:

 

In your rules, use the following code to return the Allowed Values as an ArrayList object:

 

import java.util.ArrayList;

import sailpoint.object.Custom;

 

      Custom allowedValues = context.getObjectByName(Custom.class,"AllowedValues");

      if (allowedValues != null) {

              return (ArrayList)allowedValues.get("Cities");

      } else return null;

 

or

import java.util.ArrayList;

import sailpoint.object.Custom;

 

      Custom allowedValues = context.getObjectByName(Custom.class,"AllowedValues");

      if (allowedValues != null) {

              return (ArrayList)allowedValues.get("EmploymentStatus");

      } else return null;

 

An update: More can be found on this topic here, Leveraging the custom object in IdentityIQ

Labels (1)
Version history
Revision #:
2 of 2
Last update:
‎Aug 01, 2023 11:38 PM
Updated by: