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

Syntax for If- else condition in REST connector fetching values through dynamic attributes from ARS

rohan32
New Contributor
New Contributor

Hi,

 

We need to implement if-else condition during provisioning in REST connector based on the the values selected for a single drop down value in ARS form.

Ex : if the country selected is "Argentina" in the ARS form during access request , the default BU during provisioning should be "731234" , if if the country selected is "Albania" in the ARS form during access request , the default BU during provisioning should be "731226" and so on...

We are trying using this syntax below - 

${(requestAccessAttributes.customproperty24.toString()=='Argentina')?'<DefaultBusinessUnit>'+'7314590'+'</DefaultBusinessUnit>':'7319017'}

The syntax is not throwing any error but is not working.

Tried using - ${(true==true)?'<DefaultBusinessUnit>'+'7314590'+'</DefaultBusinessUnit>':'7319017'} and is working as expected.

Could you please let me know how to fetch values from dynamic attribute in the if-else condition in REST connector?

4 REPLIES 4

nimitdave
Saviynt Employee
Saviynt Employee

Please try like below:

${(requestAccessAttributes.get('<Dynamic attribute name mapped to cp24')=='Argentina')?'<DefaultBusinessUnit>7314590</DefaultBusinessUnit>':'7319017'}

rohan32
New Contributor
New Contributor

Hey Nimit,

 

Thank you for the response. Let me try this and get back to you

rohan32
New Contributor
New Contributor

The tasks got provisioned from Saviynt , checking with app team if the same got updated in target . Will let you know

rohan32
New Contributor
New Contributor

Syntax is working as expected. Thanks Nimit!