Skip to main content
Level 2
Feb 1, 2023 4:58 PM UTC
Solved

How to pass a reference to variable in Update query

Hi,

 

I have to insert/update data to Campaign classic DB from a JS activity. I receive the info in a webservice call, so i read the date and loop and have to pass the details in an update query. But the query is only accepting values not a reference to variable which I read from the call. please advice how an I pass a reference to var?

 

I have the below script,

 

workEmail is the variable with value I read from the webservice call data.

 

var updateEmp = <recipient xtkschema="nms:recipient"
operation="_update" _key="@email"

email= workEmail
futRetNot="true" />

xtk.session.Write(updateEmp);

 

I get this error,

 

 js JST-310000 Error while compiling script 'tWKF945/js' line 79: invalid XML attribute value (line=' email= workEmail' token='workEmail').

 

How can I pass the workEmail?

 

Thanks,

Sirisha

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Manoj_Kumar
Manoj_KumarAccepted solution
Community Advisor
Feb 1, 2023 10:24 PM UTC

Hello @sirikambampati 

 

You can pass it like this.

email= {workEmail}

 

Manoj  | https://themartech.pro

12 replies

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
Feb 1, 2023 10:24 PM UTC

Hello @sirikambampati 

 

You can pass it like this.

email= {workEmail}

 

Translate
Manoj  | https://themartech.pro
Level 2
Feb 2, 2023 3:29 PM UTC

Thank you @_manoj_kumar_ 

Translate