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

Convert string attribute to Interger in update account JSON

Kaushik1
New Contributor
New Contributor

Hi Team,

We have a requirement to pass the current user status from Saviynt to target application. However, when we are passing status as below- it is failing as the garget app has defined status as integer at their end but are getting string from Saviynt. Can you please help on how we can update below so it pass the value as integer.

\"Active\": \"${user.statuskey==1?1:0}\"

 

6 REPLIES 6

CR
Regular Contributor III
Regular Contributor III

@Kaushik1  try below

Integer.parseInt(${user.statuskey==1?1:0})


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Kaushik1
New Contributor
New Contributor

To confirm- will it be added as below?

\"Active\":Integer.parseInt(${user.statuskey==1?1:0})

Hi @Kaushik1 ,

Can you try below expression and check.

\"Active\":${user.statuskey}


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

CR
Regular Contributor III
Regular Contributor III

yes, you can try


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

ArvindKumar
New Contributor III
New Contributor III

hi, 

try this. 

\"Active\": ${user.statuskey==1 ? 1 : 0}

Regards,Arvind

 

AmitM
Valued Contributor
Valued Contributor

HI @Kaushik1 , Status key on Saviynt side is also integer. The use of " in JSON might be the cause.

Try in postman first and check which JSON format works :

"Active" : 1 or "Active" : "1"

If "Active" : 1 , this is what target accepting then try \"Active\":${user.statuskey} in Saviynt JSON.

If this doesn't work in Saviynt then try parseInt function

Thanks,

Amit