Hello Experts,
I have created a form and one of the field is an identity field where the user have to select before submitting the form. Now, I was able to successfully display the list of user for selection. But the problem is, since the user list is long list, IIQ is very slow in terms of displaying and making my instance slow during form submission.
Is it possible to add the option to load the list of user data like 5-10 user at once?
Adding “load more” option similar to this
I have attached the field query for reference
<Field dependencies="Operation" displayName="Select a User" dynamic="true" name="User" postBack="true" required="true" type="sailpoint.object.Identity">
<AllowedValuesDefinition>
<Script>
<Source>
import sailpoint.object.*;
import sailpoint.object.Identity;
import sailpoint.object.Filter;
import sailpoint.object.QueryOptions;
import sailpoint.api.SailPointContext;
import sailpoint.tools.GeneralException;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
Field f6 = form.getSection("Section 1").getField("Operation");
String f6value = f6.getValue();
List items = new ArrayList();
try {
if ("Add Legal Hold".equalsIgnoreCase(f6value)) {
// Define the filter for identities with a link to the "AD" application
Filter app1 = Filter.eq("links.application.name", "AD");
Filter app2 = Filter.eq("links.application.name", "AD2");
// Add filter for identities where "ON_Legal_Hold" is not true
Filter notOnLegalHold = Filter.ne("On_Legal_Hold", "true");
// Combine filters
Filter combined = Filter.and(Filter.or(app1, app2), notOnLegalHold);
QueryOptions ops = new QueryOptions();
ops.addFilter(combined);
List saver = context.getObjects(Identity.class, ops);
// Fetch identities with the specified filter
for (Identity eachIdentity : saver ) {
List l2 = new ArrayList();
l2.add(eachIdentity.getId());
l2.add(eachIdentity.getAttribute("displayName"));
items.add(l2);
}
} else if ("Remove Legal Hold".equalsIgnoreCase(f6value)) {
// Define the filter for identities in the "Executive Management" department
Filter f1 = Filter.eq("On_Legal_Hold", "true");
QueryOptions ops1 = new QueryOptions();
ops1.addFilter(f1);
List saver2 = context.getObjects(Identity.class, ops1);
// Fetch identities with the specified filter
for (Identity eachIdentity1 : saver2) {
List l3 = new ArrayList();
l3.add(eachIdentity1.getId());
l3.add(eachIdentity1.getAttribute("displayName"));
items.add(l3);
}
}
} catch (GeneralException e) {
log.error("Error querying identities: " + e);
}
return items;
</Source>
</Script>
</AllowedValuesDefinition>