Form: type = ManagedAttribute - Drop Down Display label custom (id, decscription...etc)

Hi all,

IIQ version: 8.5
Use case: In a form I have a dynamic dropdown that returns a list of ManagedAttribute objects (filtered by two classifications, e.g., GDrive + selected location). I’d like the visible label of each option to come from a custom attribute (e.g., description or sysDescriptions.de_DE) instead of the default displayName.

What I tried

  • Field type is ManagedAttribute. Allowed values return List<ManagedAttribute>.

  • I tried adding form attributes like valueProperty/displayProperty, but for type="ManagedAttribute" they seem to be ignored (the UI still shows the default ‘groups/memberOf/……….`).

Question

  • Is there a supported way to keep type="ManagedAttribute" and override the displayed label in the dropdown (e.g., tell the renderer to use description or another attribute)?

  • Does the form rendering support providing something like SelectOption (id + label) while still binding the actual value to the full ManagedAttribute?

  • Any hidden/less-documented field attribute, renderer hook, or recommended pattern for this?

Minimal snippet (simplified)

<Field
  name="gDriveItem"
  type="ManagedAttribute"
  displayName="Drives Options"
  dynamic="true" postBack="true"
  dependencies="selectedLocation"
  required="true">
  <AllowedValuesDefinition>
    <Script>
      <Source>
        import sailpoint.object.*;
        import sailpoint.object.Filter;
        import sailpoint.object.QueryOptions;

        if (selectedLocation == null || selectedLocation.trim().isEmpty())
          return java.util.Collections.EMPTY_LIST;

        QueryOptions qo = new QueryOptions();
        Filter f1 = Filter.collectionCondition("classifications",
                   Filter.eq("classification.name", "GDrive"));
        Filter f2 = Filter.collectionCondition("classifications",
                   Filter.eq("classification.name", selectedLocation.trim()));
        qo.addFilter(Filter.and(f1, f2));

        
        return context.getObjects(ManagedAttribute.class, qo);
      </Source>
    </Script>
  </AllowedValuesDefinition>
</Field>

Goal
Keep the field typed as ManagedAttribute for clean binding/validation, but display a custom label (preferably description with fallback to sysDescriptions, then displayName).

Hi @abartkowski

I do not think it is possible to use type as ManagedAttribute but display a custom label but you can set the type = “AllowedValues” and then use “Multi-lingual Allowed-values Lists” approach. ie In your script you can do this

List finalList = new Arraylist();
forEach of your ManagedAttribute
{
List subList = new Arraylist();
subList.add(id of attribute);
sibList.add(display Label);
finalList.add(subList);
}
return finalList;

The first string value in each list will be saved as the field’s value when that choice is selected on the form. The second string of each list defines the display value to show in the UI.

Thanks,
Praveen

1 Like

Hi @praveen_s_subramanian

That is not a solution that I wish find… but it works fine :smiley:

I will wait maybe for another option that can fix it.

Thank you a lot!!!

1 Like

I have created a post with detailed solution.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.