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

Passing web form data to recipient table using Javascript

Avatar

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

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

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
jasonw30638826
Level 3

08-02-2019

Hi,

I created a subscription form which contains first name and email address only. I want to add a hidden field "language" and have it's default value set to "EN",  however, the value "EN" didn't pass to the recipient table after submission.

This is my current workflow for the web form.

1687154_pastedImage_3.png

Is this possible to use the JavaScript to pass the language field = "EN" to the recipient table using the workflow below, and what is the JavaScript code?

1687155_pastedImage_4.png

Thanks,

ED

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
david_garcia1
MVP

08-02-2019

I usually like to use a js activity to collect data stored in variables on my webapps, you have more control over it. check the following SOAP methods in JavaScript

i.e writing from webapp to a custom schema.

And you can even pass these variables from a webapp to a workflow using xtk.workflow.PostEvent

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
david_garcia1
MVP

26-02-2019

The first bold value remove the prefix and leave it as recipient only.

Avatar

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

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

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
jasonw30638826
Level 3

26-02-2019

Thanks David. I am not quite sure about the name of "mySchema". I don't use any custom schema. so I think my scheme is nms:recipient. So I replaced the below myscheme to nms:recipient?

var language = "EN";

  xtk.session.Write(<nms:recipient xtkschema="nms:recipient"

      language={ctx.vars.language}

      />);

I tested it above code, it didn't work. Could you please let me know if there is error in the above code?

Thanks again.

ED

Avatar

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
MVP
david_garcia1
MVP

Likes

106 likes

Total Posts

182 posts

Correct Reply

41 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
david_garcia1
MVP

26-02-2019

You need to replace all "mySchema" values to the name of the schema you are writing to, also you have a typo in value recipient.

Avatar

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

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

Avatar
Validate 1
Level 3
jasonw30638826
Level 3

Likes

21 likes

Total Posts

47 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
jasonw30638826
Level 3

26-02-2019

Thanks David for your reply. I am currently using default form creation from Adobe Campaign under online \web application, please see the workflow below.  I added the JS script activity and try to pass the language field = "EN" to the recipient table, it didn't work.

1699938_pastedImage_4.png

Could you please take a look at the code below and let me know if there is any workaround?

var language = "EN";

  xtk.session.Write(<myschema xtkschema="cus:receipient"

      language={ctx.vars.language}

      />);

Thanks,

ED