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" language="javascript"> | |
Platform.Load("core","1"); | |
var prox = new Script.Util.WSProxy(); | |
function traverseChildFolders(parentID) { | |
var cols = ["ID","ParentFolder.ID","Name"]; | |
var filter = {Property: "ParentFolder.ID", SimpleOperator: "equals", Value: parentID}; |
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 | |
_ContactID ContactID | |
, _DeviceID DeviceID | |
, _APID APID | |
, _Status Status | |
, _Source Source | |
, _SourceObjectId SourceObjectId | |
, _Platform Platform | |
, _PlatformVersion PlatformVersion | |
, _Alias Alias |
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
%%[ | |
set @today = now() | |
set @monthOfThisMonth = DatePart(@today, "M") | |
set @yearOfThisMonth = DatePart(@today, "Y") | |
set @firstDayOfThisMonth = dateparse(concat(@yearOfThisMonth,"-",@monthOfThisMonth,"-01",)) | |
set @nextMonth = dateadd(@today, 1, "M") | |
set @monthOfNextMonth = DatePart(@nextMonth, "M") | |
set @yearOfNextMonth = DatePart(@nextMonth, "Y") | |
set @firstDayOfNextMonth = dateparse(concat(@yearOfNextMonth,"-",@monthOfNextMonth,"-01",)) |
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" language="JavaScript"> | |
// src: https://gist.github.com/wvpv/19777e1167d6ac91e2e8 | |
// demo: https://pub.s7.exacttarget.com/yo3hzpktgmu?qs=7145718410d87e2af4e5001112e1de43e2e457b69041ac21&mid=7203368 | |
Platform.Load("core", "1"); | |
var debug = true; | |
var request = {}; |
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
search: <(table|tbody|thead|tr|td|p|div)(.*?)> | |
replace: \n<\1\2>\n | |
search: <\/(table|tbody|thead|tr|td|p|div)> | |
replace: \n<\/\1> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<s:Header> | |
<a:Action s:mustUnderstand="1">Create</a:Action> | |
<a:To s:mustUnderstand="1">{{soapEndpoint}}</a:To> | |
<fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth> | |
</s:Header> | |
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI"> | |
<Options> |
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
%%[ | |
set @dateToCheck = "2023-10-25" | |
set @month = datepart(@dateToCheck, "M") | |
set @day = datepart(@dateToCheck, "D") | |
set @daysOfWeek = "SunMonTueWedThuFriSat" | |
set @dayOfWeekToFind = format(@dateToCheck,"ddd") | |
set @dayOfWeekNum = divide(add(indexof(@daysOfWeek,@dayOfWeekToFind),2),3) |
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" language="JavaScript"> | |
Platform.Load("core","1"); | |
var debug = true; | |
var prox = new Script.Util.WSProxy(); | |
var mid = Platform.Function.AuthenticatedMemberID(); | |
var publicationLists = getAllPublicationLists(); | |
if (debug) { |
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 | |
createdDate | |
from [dataExtension] | |
where | |
dateadd(dd,datediff(dd,0,createdDate), 0) = | |
dateadd(d, -1, dateadd(m,datediff(m,0,dateadd(dd,datediff(dd,0,getDate()), 0))+1,0)) |
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 | |
x.emailAddress | |
, x.firstName | |
, x.zip | |
, x.store_zip | |
, x.store_phone | |
, x.ranking | |
, x.distance | |
from ( | |
SELECT |
NewerOlder