この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
I have a survey schema that has a bunch of normal attributes and a memo element. When I use xtk.session.Write with an XML object, the string & date attributes update fine in DB, but the memo elements are not getting updated and is blank.
The form field values are stored in local variable and are substituted in the query in javascript. Any idea how to template in an XML element for variable values for memo element in the JS. If i hard code normal text in between xml element of memo fields it is getting stored but not the vars.
Schema elements & attributes :
<attribute desc="Unique Customer ID" label="Customer ID"
length="40" name="cusId" type="string"/>
<attribute desc="Question1" label="Question1" length="40" name="question1"
type="string"/>
<attribute desc="Question2" label="Question2" length="40" name="question2"
type="string"/>
<attribute desc="Question3" label="Question3" length="40" name="question3"
type="string"/>
<attribute desc="Question4" label="Question4" length="40" name="question4"
type="string"/>
<attribute desc="Question5" label="Question5" length="40" name="question5"
type="string"/>
<attribute desc="Question6" label="Question6" length="40" name="question6"
type="string"/>
<attribute desc="Survey Created Date" label="Survey Created Date" name="createdDate"
type="datetime"/>
<element desc="Comment" label="Unsatisfied experience"
name="commentunsatisfaction" type="memo" xml="true"/>
<element desc="Comment" label="Suggestion" name="commentimprovements"
type="memo" xml="true"/>
Query:
var query = <survey _operation='insert' _key='@cusId' cusId={ctx.vars.userId} question1={ctx.vars.question1} question2={ctx.vars.question2} question3={ctx.vars.question3} question4={ctx.vars.question4} question5={ctx.vars.question5} question6={ctx.vars.question6} createdDate={currentDate} xtkschema="cus:survey"><commentunsatisfaction>{ctx.vars.comment1}</commentunsatisfaction><commentimprovements>{ctx.vars.comment2}</commentimprovements></survey>;
xtk.session.Write(query);
Please provide your inputs.
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi,
Use xtk.persist.Write().
Thanks,
-Jon
表示
返信
いいね!の合計
Thanks Jon, When i tried to use the above method i am getting the following error,
表示
返信
いいね!の合計
表示
返信
いいね!の合計