ShivangiS
(Shivangi Singh)
May 6, 2025, 9:56am
1
Which IIQ version are you inquiring about?
8.4p2
Share all details about your problem, including any error messages you may have received.
I have a form where user IDs are taken as input. I want to create a review page based on the input IDs, along with Email(auto-fetched) in table format shown up in review page. How to do in table. The table should contain two coumns: User ID, Email. The data from the form should populate itself in review page as table.
This might help in your case. add it in your workflow
<Step icon="Default" name="Generic Step" posX="320" posY="121">
<Approval name="User Details Form" owner="ref:launcher" return="identityModel" send="identityModel">
<Arg name="workItemFormBasePath" value="identityModel"/>
<Form name="User Details Form">
<Attributes>
<Map>
<entry key="pageTitle" value="User Details Form"/>
</Map>
</Attributes>
<Description>Second Form</Description>
<Section name="Section 12" type="text">
<Field displayName="User Info" filterString="htmlRender" name="tableData" type="text">
<Script>
<Source> import sailpoint.object.Filter;
import sailpoint.object.IdentityEntitlement;
import sailpoint.object.Link;
import sailpoint.object.QueryOptions;
import sailpoint.tools.GeneralException;
import sailpoint.tools.Util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Log log = LogFactory.getLog("sailpoint.bsh.demo");
Iterator it = null;
boolean roleWithApp = false;
List users = new ArrayList();
String mainStr = "<table border=\"1\" cellpadding=\"3\" cellspacing=\"3\" width=\"100%\" style=\"border-collapse:collapse;\">\n" +
" <tr>\n" +
" <th>ID</th>\n" +
" <th>Display Name</th>\n" +
" <th>Email</th>\n" +
" </tr>\n";
try {
String applicationName = (String) identityModel.get("applicationName");
String roleName = (String) identityModel.get("roleName");
QueryOptions options = new QueryOptions();
options.setCloneResults(true);
if (Util.isNotNullOrEmpty(roleName)) {
options.addFilter(Filter.and(Filter.eq("value", roleName)));
options.add(new Filter[]{Filter.or(Filter.eq("name", "assignedRoles"))});
it = context.search(IdentityEntitlement.class, options);
roleWithApp = true;
} else {
// fetch users with app
options.addFilter(Filter.and(Filter.and(Filter.eq("application.name", applicationName))));
it = context.search(Link.class, options);
}
while (it != null && it.hasNext()) {
if (roleWithApp) {
IdentityEntitlement identityEntitlement = (IdentityEntitlement) it.next();
mainStr += "<tr>\n" +
"<td>" + identityEntitlement.getIdentity().getName() + "</td>\n" +
"<td>" + identityEntitlement.getIdentity().getDisplayName() + "</td>\n" +
"<td>" + identityEntitlement.getIdentity().getEmail() + "</td>\n" +
"</tr>\n";
} else {
Link link = (Link) it.next();
if (link.getIdentity() != null) {
mainStr += "<tr>\n" +
" <td>" + link.getIdentity().getName() + "</td>\n" +
" <td>" + link.getIdentity().getDisplayName() + "</td>\n" +
" <td>" + link.getIdentity().getEmail() + "</td>\n" +
"</tr>\n";
}
}
}
mainStr += "</table>";
} catch (GeneralException e) {
log.error("Exception thrown while fetching identities : " + e.getMessage());
}
return mainStr;
</Source>
</Script>
</Field>
</Section>
<Button action="next" label="Next" parameter="userAction" value="next"/>
<Button action="cancel" label="Cancel" parameter="userAction" skipValidation="true" value="cancel"/>
</Form>
</Approval>
<Transition to="Stop"/>
</Step>