I have a small question. If I want to populate Applications in a Form’s field I am using
type = Application
with the field.
How can I know that the applications which are populated in the field are active?
I have a small question. If I want to populate Applications in a Form’s field I am using
type = Application
with the field.
How can I know that the applications which are populated in the field are active?
Hi @pctripathi,
When you specify type="Application"
in the form field, the form dynamically populates the dropdown list with all configured applications.
How are differentiate between active and inactive application?
1.Create an extended attribute on the Application object to indicate whether an application is active or inactive. Once you have those values set, you can easily build the logic to filter and retrieve only the active applications.
1. <Field columnSpan="1" displayName="Application" dynamic="true" name="application" type="Application">
<Script>
<Source>import sailpoint.object.Identity;
import sailpoint.object.Link;
import sailpoint.object.Application;
import java.util.List;
</Source>
</Script>
</Field>
Hi @Arun-Kumar @narayanag
I want to implement a check in this field so the applications which are decommissioned should not get populated in this dropdown. But can’t figure out what attribute or filter should I apply for that.
I agree with @narayanag approach.
Obviously, you need a specific logic to identify whether the application is active or not. or else if you think out of the box, you can iterate through each application and test the connection, if result is successful then set that application attribute.
Just want to be clear when you mentioned about decommissioned, did you enabled maintenance on application config? or how will you treat that application is decommissioned?
If you enabled maintenance mode then you can use getMaintenanceExpiration() and you can decide based on the return value
Hi Pratik,
You can try adding the “filterString” script in the field level. Using this filterString script you can skip those applications. Below is the sample code for your reference:
<Field columnSpan="1" displayName="Division Owner" name="newDivisionOwner" required="true" type="sailpoint.object.Identity">
<Attributes>
<Map>
<entry key="filterString">
<value>
<Script>
<Source><![CDATA[import java.util.List;
import sailpoint.object.Filter;
import sailpoint.object.Identity;
Filter userTypeFilter = Filter.ignoreCase(Filter.eq("usertype", "Employee"));
Filter userStatusFilter = Filter.eq("userStatus", "Active");
Filter managerialFilter = Filter.ignoreCase(Filter.eq("managerial", "True"));
Filter finalFilter = Filter.and(userTypeFilter, userStatusFilter,managerialFilter);
log.error("Filter String in Employee form>>"+finalFilter.toString());
field.setFilterString(finalFilter.toString());]]></Source>
</Script>
</value>
</entry>
</Map>
</Attributes>
</Field>