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

JSON Error for IDMWorks

NrupenM
New Contributor II
New Contributor II

HI Team,

 

I am trying to provision account to IDMWorks and one the attribute has logic to check the length of employeeid

I have prepared the logic using if else block but the logic is not getting updated. 

Logic is if employeeid is greater than or equal to 7 characters in length value to be printed is 100+empid

if less than 7 it should be only emp id

 

JSON that i am using is 

{
"uid": "${user?.customproperty13}",
"cn": "${user.firstname},${user.lastname}",
"sn": "${user?.lastname}",
"owner": "@MGADM01",
"defaultgroup": "@MGHLD01",
"objectClass": [
"top",
"person",
"organizationalPerson",
"idforgperson"
],
"omvshome": "/",
"omvsProgram": "/bin/sh",
"omvsuid":"${if(user.customproperty4.toString().length() >= 7){100${user?.customproperty4}} else{user.customproperty4}},
"instdata": "${user?.customproperty4} HRID;${user?.username} LANID"
}

Can some one help me with the right json 

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

what is 100 ?

"omvsuid":"${if(user.customproperty4.toString().length() >= 7){100${user?.customproperty4}} else{user.customproperty4}},


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

avinashchhetri
Saviynt Employee
Saviynt Employee

Hello @NrupenM,

This should work, give it a try :

"omvsuid":${if(user.customproperty4.toString().length() >= 7){'100'+user.customproperty4} else{user.customproperty4}},

 

 

Regards,
Avinash Chhetri