Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

DB Connector - If else - Grant Access Json

G_S
New Contributor
New Contributor

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 ?

3 REPLIES 3

sk
All-Star
All-Star

Replace +accountName+ with ${accountName} and try


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

G_S
New Contributor
New Contributor

I tried with ${accountName} and it did not work

What is the error


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.