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 create an adobe campaign List using a json array of objects in a workflow

Avatar

Avatar
Validate 1
Level 1
JamesAlio
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
JamesAlio
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
JamesAlio
Level 1

14-01-2021

Hello,

i have a workflow where i create a json array using javascript activity and i want to  create a new adobe campaign list (using js code) and add to it all the data in my json array  using "javascipt acitivity" or "update list" activity.

can you please show me how i can achieve this operation in my workflow. 

 

this is the code of my Js activity :

 

var arrayOfObjects = [{
  "id": 28,
  "Title": "Sweden"
}, {
  "id": 56,
  "Title": "USA"
}, {
  "id": 89,
  "Title": "England"
}];


vars.arrayOfObjects = JSON.stringify(arrayOfObjects); 

 Regards !

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

102 likes

Total Posts

300 posts

Correct Reply

96 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

102 likes

Total Posts

300 posts

Correct Reply

96 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile
_Manoj_Kumar
MVP

14-01-2021

Hello @JamesAlio 

 

All adobe lists create a table in the DB. You can directly update that table with a SQl statement and execute that SQL statement with sqlExec.

 

You can get the list table name from the schema table as shown in this screenshot

_Manoj_Kumar_0-1610640971639.png

 

 

Now all you have to do iterate your object and do a sqlExec for each item.

 

Thanks,

Manoj

 

Answers (0)