So basically you are looking for three fields which they can filter which will be name, email or user id ( username within SailPoint) and return a matching user for the same if found?
Also are you looking for these fields as free text or Drop down? and also exact match or not required if free text?
You can actually go to your corresponding quick link population and do the following
Enable View Identity and select for self and for other
This way it will give a way to filter all the identities within Sailpoint IIQ using searchable attributes this would be more easier way
Still if you want to do only above three attributes, instead of going with dropdown, go with free text and input should be provided by users ( reason being having dropdown for string fields will end up loading all the identities every time form loads and can cause performance issues)
By default the form field name will act as variable which will be keeping the value that have been selected. But it will be visible within form only.
At the same time if you want to make some selection in the field and want to store in some variable and then want to use it in the workflow then you may declare a variable in workflow and the same can be used as variable name(field name).
Note: Just pass this variable in the step where you are opening form.
Please use below sample Form, which will store the input form variables, provide the form field names as variables for your workflow, modify the code based on your fields
<Form name="Select Identity Based on Filter" type="Workflow">
<Attributes>
<Map>
<entry key="pageTitle" value="User-defined Filter Identity"/>
</Map>
</Attributes>
<Description>Select Identity Based on Filter</Description>
<Section name="Section 1">
<Field displayName="Identity Name Selection" name="identityNameSelected" postBack="true" type="string"/>
<Field displayName="Identity Display Name Selection" name="identityDisplayNameSelected" postBack="true" type="string"/>
<Field displayName="Identity Email Selection" name="identityEmailSelected" postBack="true" type="string"/>
<Field displayName="Identity Selected" dynamic="true" multi="true" name="identitySelected" type="string">
<Attributes>
<Map>
<entry key="readOnly" value="true"/>
</Map>
</Attributes>
<Script>
<Source>
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.Field;
import sailpoint.object.Identity;
import sailpoint.tools.Util;
List identityNames=new ArrayList();
QueryOptions qo = new QueryOptions();
String identityNameSelected="";
String identityDisplayNameSelected="";
String identityEmailSelected="";
Field identityNameSelectedField = form.getField("identityNameSelected");
if(identityNameSelectedField!=null && identityNameSelectedField.getValue()!=null ){
identityNameSelected=identityNameSelectedField.getValue().toString();
}
Field identityDisplayNameSelectedField = form.getField("identityDisplayNameSelected");
if(identityDisplayNameSelectedField!=null && identityDisplayNameSelectedField.getValue()!=null ) {
identityDisplayNameSelected=identityDisplayNameSelectedField.getValue().toString();
}
Field identityEmailSelectedField = form.getField("identityEmailSelected");
if(identityEmailSelectedField!=null && identityEmailSelectedField.getValue()!=null ){
identityEmailSelected=identityEmailSelectedField.getValue().toString();
}
if(!(Util.isNullOrEmpty(identityNameSelected) && Util.isNullOrEmpty(identityDisplayNameSelected) && Util.isNullOrEmpty(identityEmailSelected) )){
if(Util.isNotNullOrEmpty(identityNameSelected))
{
qo.addFilter(Filter.ignoreCase(Filter.eq("name",identityNameSelected)));
}
if(Util.isNotNullOrEmpty(identityDisplayNameSelected))
{
qo.addFilter(Filter.ignoreCase(Filter.eq("displayName",identityDisplayNameSelected)));
}
if(Util.isNotNullOrEmpty(identityEmailSelected))
{
qo.addFilter(Filter.ignoreCase(Filter.eq("email",identityEmailSelected)));
}
Iterator it = context.search(Identity.class, qo);
while ( (it != null) && (it.hasNext()) ) {
Identity identityCube = (Identity) it.next();
String identityName=identityCube.getName();
identityNames.add(identityName);
}
}
return identityNames;
</Source>
</Script>
<ValidationScript>
<Source>
import sailpoint.tools.Util;
import sailpoint.object.Field;
String identityNameSelected="";
String identityDisplayNameSelected="";
String identityEmailSelected="";
Field identityNameSelectedField = form.getField("identityNameSelected");
if(identityNameSelectedField!=null && identityNameSelectedField.getValue()!=null ){
identityNameSelected=identityNameSelectedField.getValue().toString();
}
Field identityDisplayNameSelectedField = form.getField("identityDisplayNameSelected");
if(identityDisplayNameSelectedField!=null && identityDisplayNameSelectedField.getValue()!=null ) {
identityDisplayNameSelected=identityDisplayNameSelectedField.getValue().toString();
}
Field identityEmailSelectedField = form.getField("identityEmailSelected");
if(identityEmailSelectedField!=null && identityEmailSelectedField.getValue()!=null ){
identityEmailSelected=identityEmailSelectedField.getValue().toString();
}
if(Util.isNullOrEmpty(identityNameSelected) && Util.isNullOrEmpty(identityDisplayNameSelected) && Util.isNullOrEmpty(identityEmailSelected) )
return "One of the Above Fields are required";
if(value==null){
return "There is no corresponding Identity match for above values , provide the correct value";
}
if(value instanceof List)
{
if(value.size()>1)
return "Multiple Identities selected with above selection, please recheck";
if(value.size()==0)
return "There is no corresponding Identity match for above values , provide the correct value";
}
</Source>
</ValidationScript>
</Field>
</Section>
<Button action="cancel" label="Cancel"/>
<Button action="next" label="Submit"/>
</Form>```
This will be helpful in searching identities usig their name or email id’s.
In your case, you can use email id and username to search and the result will be populated instantly in the dropdown from where you can select the user.
In case you want to use it in the workflow, just return the field name “name” (assuming you have already created a workflow variable on the name “name”) from the step where you are calling the form.
b. add entry in Identity Selector for Filter (Cofiguration : IdentitySelectorConfiguration) .
So your form should be clean and you can use this selector entry for other forms also.
Entry in Identity Selector
<entry key="YourFormName-form-sname-field">
<value>
<IdentityFilter name="SelectIdentity" order="Ascending">
<FilterScript>
<Script><Source>
// add filter here like to choose identity which is Active only
</Source>
</Script>
</FilterScript>
<OrderBy>
<String>lastname</String>
<String>firstname</String>
<String>name</String>
<String>id</String>
</OrderBy>
</IdentityFilter>
</value>
</entry>