I'm trying to fetch the FilterParts of FilterDefinitions in SSJS (for debugging now used on a landing page).

var results = FilterDefinition.Retrieve({Property:"CategoryID",SimpleOperator:"equals",Value:"xxxx"});

As expected, this gives me an array of FilterDefinitions from a specific folder, and I see most of the properties just fine. I cannot read the DataFilter property though, it just gives the object type when I Stringify it:


How can I access the actual FilterPart so I can see what the filter is constructed of?

  • Seems that the only way is to request the DataFilter using Marketing Cloud API (like an external sys) because in my experience none of the build in methods of Ampscript and SSJS return you something differente from: ExactTarget.Integration.WSDL.ComplexFilterPart or null (with WSproxy).
    – Frogmouth
    Commented Mar 8, 2023 at 11:47
  • 1
    Yes, but there are some undocumented hints in WSProxy for dealing with those data types, e.g. Type. Curious if someone knows how to cast/convert those in a retrieve. Commented Mar 8, 2023 at 14:28
  • not saying it can't be done, but maybe to help others' research: 1) docs say, filterDefinition doesn't support retrieve (or has limits at least) - developer.salesforce.com/docs/marketing/marketing-cloud/guide/… ; 2) adam surfaced information around it, like the aforementioned " _ _ type __ " - salesforce.stackexchange.com/questions/260225/… - this person has examples for all methods: sfmc-curated.com/sfmc-stack/… Commented Mar 10, 2023 at 7:47


You must log in to answer this question.

Browse other questions tagged .