Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.