Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created January 17, 2020 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/bef4c040a9402461aa16b989943d9343 to your computer and use it in GitHub Desktop.
Save zuzannamj/bef4c040a9402461aa16b989943d9343 to your computer and use it in GitHub Desktop.
%%[
var @rr, @sfp, @lists, @status
SET @rr = CreateObject("RetrieveRequest")
SetObjectProperty(@rr,"ObjectType","List")
AddObjectArrayItem(@rr,"Properties","ID")
AddObjectArrayItem(@rr,"Properties","ListName")
SET @sfp = CreateObject("SimpleFilterPart")
SetObjectProperty(@sfp,"Property","Type")
SetObjectProperty(@sfp,"SimpleOperator","equals")
AddObjectArrayItem(@sfp,"Value","Public")
SetObjectProperty(@rr,"Filter",@sfp)
SET @lists = InvokeRetrieve(@rr, @status, @requestID)
output(concat("rrStatus: ", @status))
output(concat("<br>rrRequestID: ", @requestID))
for @i = 1 to RowCount(@lists) do
set @list = Row(@lists, @i)
set @Name = Field(@list, "ListName")
output(concat("<br>ListName: ", @Name))
next @i
]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment