Preethi
(Preethi J)
May 1, 2024, 10:51pm
1
Which IIQ version are you inquiring about?
Version 8.2
Share all details related to your problem, including any error messages you may have received.
Hi,
We created a quicklink . In frst form it should disaply only a set of users in drop down. We tried to pull just one user using queryoptions to display in dropdowm. We were able to print that one user in advanced analyticks when we print the query options. But in Drop down it is displaying all users instead of that one user.
Can you please suggest why querry option does not returns that one value in drop down.
import sailpoint.tools.Util;
import sailpoint.object.*;
import java.util.*;
try{
List identityFinalFilter = new ArrayList();
QueryOptions qo = new QueryOptions();
Filter finalFilter= Filter.eq("name","abc");
//return finalFilter;
qo.add(finalFilter);
log.error("Final Filter::::"+finalFilter);
log.error("Final QO::::"+qo);
/* List finalIdenList = context.getObjects(Identity.class, qo);
for(Identity finalIden:finalIdenList){
log.error(“Final List::::”+finalIden.getName());
identityFinalFilter.add(finalIden.getName());
}*/
//Filter finalResultFilter=Filter.in(“name”, identityFinalFilter);
//return finalResultFilter;
}catch(GeneralException e){
log.error("Error QO : " + e.getMessage());
}
return qo;
</Source>
</Script>
</AllowedValuesDefinition>
</Field>
iamksatish
(Satish Kurasala)
May 2, 2024, 1:31am
2
@Preethi
Your allowedValuesDefintion shoould return the list of identities not the queryOptions , If you want to handle this using Filters, use below code
Within the field itself add this
filterString=“name == "abc"”
Sample
<Field columnSpan="1" displayName="Primary Owner" dynamic="true" filterString="name == "abc"" name="pwoner" postBack="true" type="sailpoint.object.Identity"/>
If your requirement is more than this and needed more help, please provide more details and form xml
iamksatish
(Satish Kurasala)
May 2, 2024, 1:35am
3
If your fIlter is more complex you can follow this as well, within the attributes set the filterString
<Field columnSpan="1" displayName="Primary Owner" dynamic="true" name="pwoner" postBack="true" type="sailpoint.object.Identity">
<Attributes>
<Map>
<entry key="filterString">
<value>
<Script>
<Source>
import sailpoint.object.*;
import sailpoint.tools.Util;
import java.util.*;
Filter f1 = null;
f1 = Filter.eq("name","abc");
if (f1 != null)
{
String filterString = f1.toString();
Field field = form.getField("pwoner");
field.setFilterString(filterString);
}
</Source>
</Script>
</value>
</entry>
<entry key="valueProperty" value="id"/>
</Map>
</Attributes>
</Field>
Preethi
(Preethi J)
May 2, 2024, 3:42pm
4
Hi Satish,
We have added filter conditions and it is working . Thanks for your help!!!
system
(system)
Closed
July 1, 2024, 4:11pm
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.