and more in a single search tool across platforms. Read the announcement here. |
04/20/2023 06:26 AM
Hi
We have multiple entitlements under one entitlement type. For one of the entitlement name i.e 'ABc ; Xyz' it requires a different insert statement to be performed on the DB.
Below is what im trying:
{
"Access": ["${if(task.entitlement_valueKey.entitlement_value.equalsIgnoreCase('ABc ; Xyz')){'INSERT INTO USER(USERNAME,ACCESSNAME,PROFILE) VALUES(\''+accountName+'\',\'ABc\',\'Xyz\')'} else {'INSERT INTO USER(USERNAME,ACCESSNAME,PROFILE) VALUES(\''+accountName+'\',\''+ task.entitlement_valueKey.entitlement_value.split(';')[0].trim() +'\',\''+ task.entitlement_valueKey.entitlement_value.split(';')[1].trim() +'\')'}}"]
}
This is failing with below error:
Error while assigning access - ABc ; Xyz to account - N3942 -No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.String) values: [+accountName+] Possible solutions: wait(), any(), wait(long), split(java.lang.String), any(groovy.lang.Closure), count(java.lang.String)
Is there any configurations i'm missing ?
04/20/2023 06:30 AM
Replace +accountName+ with ${accountName} and try
04/20/2023 06:36 AM
I tried with ${accountName} and it did not work
04/20/2023 12:43 PM
What is the error