and more in a single search tool across platforms. Read the announcement here. |
09/22/2022 06:47 AM
I have an Ent type and in the Requestable entitlement config I am using ev.custompoperty1 like '%{$dynamicattr}%'.
Now, if I select single value for this dynamic attribute then this query works and the Ent list is populated. But when I select multiple values then the UI just says "Processing".
Does this not work for multi select list? Is there any workaround for this?
Solved! Go to Solution.
09/22/2022 07:05 AM
Use find_in_set
09/22/2022 01:26 PM - edited 09/24/2022 01:32 AM
I am getting below error when using this function.
FIND_IN_SET( '${dynamicattr}',ev.customproperty3)
unexpected AST node: ( near line 1, column 144 [Select count(*) from com.saviynt.ecm.identitywarehouse.domain.Entitlement_values ev where ev.status=1 and ev.customproperty1='' and FIND_IN_SET( '',ev.customproperty3)]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: ( near line 1, column 144 [Select count(*) from com.saviynt.ecm.identitywarehouse.domain.Entitlement_values ev where ev.status=1 and ev.customproperty1='' and FIND_IN_SET( '',ev.customproperty3)]
09/22/2022 09:54 PM
This is loading because values are getting sent like below
only one value A
if 2 values - A','B
Fix - use replace all
ev.customproperty1 like '%${dynamicattr.replace("','","%' or ev.customproperty1 like '%")}%'
09/23/2022 10:11 PM
Can you explain what this statement is trying to replace and with what?
get value from dynamic attribute as A','B and then replace ',' with what?
I am still getting "Processing" after using this statement.
09/24/2022 01:11 AM
Working as expected. Needed to replace in one more condition in the query.
09/24/2022 01:53 AM
What is fix?
09/24/2022 04:01 PM
I had one more condition in the query where I was checking the dynamic attribute. so I added the replace function there as well.
09/26/2022 11:17 PM - edited 09/27/2022 07:28 AM
Hi @piyushm
Could you please share the query that worked for you? So in the future if any other folks in the community having similar questions will be able to have a working sample reference.
09/27/2022 06:19 PM
@Belwyn , please find the query below.
and '${dynamicattr.replace("','",""}'!='' and ev.customproperty1 like '%${dynamicattr.replace("','","%' or ev.customproperty1 like '%")}%'