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

Create and Update Account JSON for AD

Prajna
New Contributor
New Contributor

Hi Team,

We are using title attribute in the create and update account json as mentioned below. The requirement is if customproperty 54 and customproperty 25 not eqaul to null then it will concat custompropert 54 with On loan/ Rotation/Secondment/Acting For based on the value of customproperty25. If it doesn't satisfy these conditions it will print the jobcodedesc. This fails with attribute conversion error. Can you please suggest the query to fix this issue. In logs we see the title value is null.

"title": "${if(user.customproperty54!=null && user.customproperty25!=null) {user.customproperty54+ (user.customproperty25=='ZOL' ? '(On-Loan)' : (user.customproperty25=='ZRO' ? '(Rotation)' : (user.customproperty25=='ZSE' ? '(Secondment)' : (user.customproperty25=='ZAF' ? '(Acting For)' : user.jobcodedesc))))}}",

2 REPLIES 2

krunalkadam
New Contributor III
New Contributor III

It seems like you are encountering an issue due to the way conditional logic is structured within your query for generating the "title" attribute. The issue leading to the "attribute conversion error" and subsequently, the "title" value being null, might be due to the improper handling of the conditions or the concatenation logic within the JSON structure. Here's an updated approach to structure your query to address these problems:

 

"title": "${user.customproperty54!=null && user.customproperty25!=null ? user.customproperty54 + ' ' + (user.customproperty25=='ZOL' ? '(On-Loan)' : (user.customproperty25=='ZRO' ? '(Rotation)' : (user.customproperty25=='ZSE' ? '(Secondment)' : (user.customproperty25=='ZAF' ? '(Acting For)' : '')))) : user.jobcodedesc}"

 

In this revised version, the conditional logic is structured to first check if both customproperty54 and customproperty25 are not null. If both properties are not null, it concatenates customproperty54 with the string corresponding to the value of customproperty25. If the values of customproperty25 are 'ZOL', 'ZRO', 'ZSE', or 'ZAF', it appends '(On-Loan)', '(Rotation)', '(Secondment)', or '(Acting For)' respectively to customproperty54. If customproperty25 does not match any of these values or if any of the initial conditions are not met (i.e., either customproperty54 or customproperty25 is null), it falls back to using user.jobcodedesc.

Regards,

Krunal Kadam

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

rushikeshvartak
All-Star
All-Star

"title": "${user.customproperty54 != null && user.customproperty25 != null ? (user.customproperty54 + (user.customproperty25 == 'ZOL' ? ' (On-Loan)' : (user.customproperty25 == 'ZRO' ? ' (Rotation)' : (user.customproperty25 == 'ZSE' ? ' (Secondment)' : (user.customproperty25 == 'ZAF' ? ' (Acting For)' : ''))))) : user.jobcodedesc}"


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