New answers tagged

0 votes

SSJS - Creating HTML table from Lists pulled

the response from Gortonington look great, just one this if if (i = 1) should be if (i == 1) and also (i = allPublicationLists.length) should be (i == allPublicationLists.length) because its doing ...
1 vote

Programatically update the "Used for Sending" value for DEs in folder and all child folders

Speaking of your code: First of all, it is not recommended to use undocumented API endpoints, since they might be changed/removed/disabled at any point in time, thus making the solution in a long run ...
  • 2,451
0 votes

Remove duplicates from an array built in SSJS

The following seems to work but may be overkill: var outputArray = []; var count = 0; var start = false; for (j = 0; j < mls_text_array.length; j++) { for (k = 0; k < ...
0 votes

Split into different rows using SSJS or Query or whatever

The common concept to do this is that you would need to split the "field 3" column values by , character and hence insert a new row to a new DE for each element. The following code here is a ...
  • 1,266
1 vote
Accepted

Targeting a nested array with SSJS to use with a for in loop in Marketing Cloud

I believe you would need to parse the JSON first and then use a loop to write keys and values in the nested JSON. Try something like this in the email: (assuming the DE is using as the data source in ...
  • 1,266
3 votes
Accepted

How can I count the number of objects in my JSON

This is actually super simple, if you use SSJS and the ParseJSON function. The function returns a JS object, and you can easily check it's length property using .length as illustrated below: %%[ VAR @...
  • 19.1k
1 vote

SSJS RemoveCookie and SetCookie

I couldn't get RemoveCookie to work either, but there is a work around. You can set headers instead. HTTPHeader.SetValue("Set-Cookie", 'mycookie="deleted"; path=/; expires=Thu, 01 ...
  • 206
0 votes

Submitting HTML characters to a Data Extension via Landing Page and SSJS

Not sure if you still need this, but see my answer on this post. AMPscript to decode HTML entity in data extension field
2 votes

Platform function HTTPPost issue

First of all, I totally agree with Duc Le you should use Script.Util.HttpRequest instead of Platform.Function.HTTPPost. But your actual issue is, that you missed the last parameter of HTTPPost I ...
  • 21
0 votes
Accepted

Platform function HTTPPost issue

Update: like @Ghingis pointed out. The Platform.Function.HTTPPost function has 6 required parameters and you missed the last parameter. The header value supposes to be Bearer YOUR_ACCESS_TOKEN as the ...
  • 1,266
0 votes

Redirect to another page on submit

InsertDE is for emails. InsertDATA is what you want on cloudpages. See here (green boxes): https://ampscript.guide/insertdata/ vs here: https://ampscript.guide/insertde/ In general, this should work. ...
1 vote

Find emails sent to a specific data extension?

The way I know is putting system personalization strings into email and then create a sendlog DE to capture those information. Hence you will have information both Email Name and the Data Source were ...
  • 1,266
0 votes

Find emails sent to a specific data extension?

The only way to get this info that I can think of would be to go to Email Studio > Tracking and go through each send one by one and check which DE was used under tracking details:
  • 13.7k

Top 50 recent answers are included