Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to insert element into schema using xtk.session.Write

Avatar

Avatar
Validate 1
Level 1
BoguslawBialy
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
BoguslawBialy
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
BoguslawBialy
Level 1

27-03-2017

Hi Team,

I've got issue with inserting data into my custom table. I'm able to insert attribute of my table, but cannot update the element.

I'm using the following expression:

xtk.session.Write(<qaSurvey _operation="insert" Question3="BoguslawTest33" email="test@test.com" Edited_Question="BoguslawTest35" xtkschema="adbe:qaSurvey"/>);

and my database have the following schema: 

 <element autopk="true" label="QA Survey" name="qaSurvey">
    <key internal="true" name="internal">
      <keyfield xpath="@id"/>
    </key>
    <attribute label="Primary key" name="id" notNull="false" sqlname="iId" type="long"/>
    <element label="Edited_Question" name="Edited_Question" sqlname="sEdited_Question"
             type="string"/>
    <attribute label="Email (Responses to recipient forms/Recipient)" name="email"
               sqlname="sEmail" type="string"/>
    <element label="XML memo" name="data" sqlname="mData" type="memo"/>
    <element label="Question" name="Question3" type="memo"/>
  </element>

As a result of my query I'm getting a new row with Primary key and email address only. Question3 and Edited_Question are blank.

How can I insert the Question3 and Edited_Question elements to my table?

Best Regards,
Boguslaw

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
ddphotoFr
Employee

Likes

9 likes

Total Posts

14 posts

Correct Reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 5
Employee
ddphotoFr
Employee

Likes

9 likes

Total Posts

14 posts

Correct Reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile
ddphotoFr
Employee

28-03-2017

Hi,

 

your write expression should be:

xtk.session.Write(<qaSurvey _operation="insert" email="test@test.com" xtkschema="adbe:qaSurvey"> <Question3>BoguslawTest33</Question3> <Edited_Question>BoguslawTest35</Edited_Question> </qaSurvey>);

Damien

Answers (0)