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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 4th edition of the Campaign Community Lens newsletter is out now!
SOLVED

Multiple _key parameters in xtk.session.Write method

Avatar

Level 4

Hi All,

I would like to use xtk.session.Write method, but with multiple _key parameters. My goal is to reconcile records by two values @someId and @email at the same time. I know how to use single _key:

var newInput = "<myTable xtkschema='cus:myTable' _operation='insertOrUpdate' _key='@someId' someId='somevalue1' email='email@domain.com' nextField1='next value 1' nextField2 = 'next value 2' />";

xtk.session.Write(newInput);

But what is a proper syntax for two _keys?

Are you able to help me?

Thank you,

Marcin

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

The _key attribute is comma-delimited. Here:

xtk.session.Write("<myTable xtkschema='cus:myTable' _operation='insertOrUpdate' _key='@someId,@email' someId='somevalue1' email='email@domain.com' nextField1='next value 1' nextField2 = 'next value 2' />");

Thanks,

-Jon

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

The _key attribute is comma-delimited. Here:

xtk.session.Write("<myTable xtkschema='cus:myTable' _operation='insertOrUpdate' _key='@someId,@email' someId='somevalue1' email='email@domain.com' nextField1='next value 1' nextField2 = 'next value 2' />");

Thanks,

-Jon

Avatar

Level 4

It works, thank you very much!