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

Getting error for update Json

Deepu
New Contributor III
New Contributor III

Hello,

 

We are trying to extract the city and state from the location field. For example, Richmond, VA. Then, for domestic employee types, we expect the city to be Richmond and the state to be VA. However, I am encountering an error."

 

"city": "${user.employeetype == 'Domestic' && user.location?.trim() && !user.location.matches('.*(from home|field sales|remote work).*') ? (user.location.contains(',') ? user.location.substring(0, user.location.indexOf(',')).trim() : user.location.trim()) : ''}",
"state": "${user.employeetype == 'Domestic' && user.location?.trim() && !user.location.matches('.*(from home|field sales|remote work).*') ? (user.location.contains(',') ? user.location.substring(user.location.indexOf(',') + 1).trim() : '') : ''}"

1 REPLY 1

rushikeshvartak
All-Star
All-Star

"city": "${user.employeetype == 'Domestic' && user.location?.trim() && !user.location.matches('.*(from home|field sales|remote work).*') ? (user.location.contains(',') ? user.location.substringBefore(',').trim() : user.location.trim()) : ''}",
"state": "${user.employeetype == 'Domestic' && user.location?.trim() && !user.location.matches('.*(from home|field sales|remote work).*') ? (user.location.contains(',') ? user.location.substringAfter(',').trim() : '') : ''}"


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