JST-31000 Error | Community
Skip to main content
New Participant
Apr 21, 2022 4:04 PM UTC
Solved

JST-31000 Error

JST-310000 Error while compiling script '_webApp_tAPP200_' line 4891: invalid assignment left-hand side (line=' ctx.recipient.@gmLocation/@country = 'CAN'
' token='= 'CAN'
').
SCR-160032 Javascript: error while compiling script '_webApp_tAPP200_'.   

I am trying to query the database through a script in a web app, but when providing the country location in the database, it is throwing an error. The folder is gmlocation/country under recipients. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
Apr 22, 2022 3:48 AM UTC

Hello @ryanng1,

 ctx.recipient.@gmLocation/@country

is not valid xpath, it should be if exists, something li:

 ctx.recipient.gmLocation.country
ctx.recipient.gmLocation.@country

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

3 replies

Sukrity_Wadhwa
Employee
May 18, 2022 12:50 PM UTC

Hi @ryanng1,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know.

In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!

Translate
Sukrity Wadhwa
Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
Apr 22, 2022 3:48 AM UTC

Hello @ryanng1,

 ctx.recipient.@gmLocation/@country

is not valid xpath, it should be if exists, something li:

 ctx.recipient.gmLocation.country
ctx.recipient.gmLocation.@country

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

Translate
_Manoj_Kumar_
New Participant
Apr 22, 2022 12:43 AM UTC

Hello @ryanng1 
According to this error, It seems you have string value on the left side and variable on the right side.

it should be 

var token='CAN'

instead of

'token'=CAN
Translate
     Manoj     Find me on LinkedIn