This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%[ | |
| VAR @ProductName | |
| SET @ProductName = "Mobile phone" | |
| ]%% | |
| <script runat=server> | |
| Platform.Load("Core","1"); | |
| //Get the Variable from AMPscript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <style> | |
| body, a, input {font-family:sans-serif;} | |
| </style> | |
| </head> | |
| <body style="font-family:sans-serif"> | |
| %%=now()=%% | |
| <h1>XML Parse with AMPScript</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Aliases | |
| alias c="clear" | |
| alias ll="ls -lah" | |
| alias lz="ls -laZ" # include (selinux) security context in listing | |
| alias cl="c && ll" | |
| alias ..="cd .." | |
| # Empty contents of files | |
| empty() { | |
| for arg in "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="javascript" runat="server"> | |
| Platform.Load("core","1.1.5"); | |
| var DE = "Contacts_To_Delete"; | |
| var logDE = "Contacts_To_Delete_Log"; | |
| var log = DataExtension.Init(logDE); | |
| var url = 'https://auth.exacttargetapis.com/v1/requestToken'; | |
| var contentType = 'application/json'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select | |
| zip | |
| , cos(radians(latitude)) * cos(radians(longitude)) xaxis | |
| , cos(radians(latitude)) * sin(radians(longitude)) yaxis | |
| , sin(radians(latitude)) zaxis | |
| from zip_axis | |
| /* credit https://stackoverflow.com/a/2233208/812377 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| Platform.Load("core","1.1.1"); | |
| try { | |
| var de = DataExtension.Init('DE Name goes here'); | |
| var data = { | |
| id: Request.GetFormField("id"), | |
| FirstName: Request.GetFormField("firstname"), | |
| Email: Request.GetFormField("email") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| var skey = "abc123"; | |
| var prox = new Script.Util.WSProxy(); | |
| // query all BUs | |
| var queryAllAccounts = true; | |
| // set the attributes to be retrieved | |
| // note Client.ID and not ClientID | |
| var cols = ["Status","Client.ID"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| Platform.Load("core","1.1.1"); | |
| var listid = 1234; | |
| var jobid = 567; | |
| var batchid = 1; | |
| var mids = { | |
| BU1: 123456, | |
| BU2: 123457, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| Platform.Load("core","1.1.1"); | |
| var prox = new Script.Util.WSProxy(); | |
| // Need to retrieve the ObjectID for the Automation, which isn't available via the SFMC interface. | |
| var cols = ["Name", "ProgramID", "IsActive"]; | |
| var filter = { | |
| Property: "Name", | |
| SimpleOperator: "equals", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| var prox = new Script.Util.WSProxy(); | |
| var tsdKey = '123'; | |
| var EmailAddress = 'joe@email.com'; | |
| var tsd = { | |
| TriggeredSendDefinition: { | |
| CustomerKey: tsdKey |