Multi-select fields dependent

Share all details about your problem, including any error messages you may have received.

Hello ,

We have a workflow Form IdentityIQ where Field A is a multi-select field and Field B is a dependent multi-select field whose allowed values are dynamically calculated based on the selections made in Field A.

When multiple values are selected in Field A, Field B must display the combined (union) set of all allowed values associated with each selected value.

Is it possible to make this kind of use case form or any workaround maybe ?

thanks for any valuable help
Best regards

Yes, you can do this, you need to write code in for the fieldB.

Basically you want to

  1. Read all selected values from Field A
  2. For each selected value, fetch its corresponding allowed values (may be stored in custom object)
  3. Merge everything into a Set (to deduplicate)
  4. Return as list

something like below

List selectedA = form.getField("fieldA").getValue();

Set result = new HashSet();

if (selectedA != null) {
    for (Object val : selectedA) {
        result.addAll(getValuesFromCustomObj(val)); //lib method to get values specific to val
    }
}

return new ArrayList(result);

Did you try above approach?

Can you share what exact issue you are facing?