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

If/Else in REST connection

anuragG
New Contributor III
New Contributor III

Hi Team,

How to use If else in REST connectors.

My Use case is - We save user's country code in Cp3. But it is 2 letter country code and i need to send 3 letter so can write if elseif condition like if users.customproperty3==IN its should pass IND.

 

Any help would be appreciated.

Thanks

2 REPLIES 2

SumathiSomala
All-Star
All-Star

@anuragG try below sample

\"country\":\"${if(user.customproperty3.equals('IN')){'IND'}else {''}}\"
\"country\":\"${if(user.customproperty3=='IN'){'IND'}else {''}}\"

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

rushikeshvartak
All-Star
All-Star

\"country\":\"${if(user?.customproperty3.equals('US')){'USA'}else if(user?.customproperty3.equals('IN')){'IND'}else {user?.customproperty3}}\"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.