ExecuteFilter()

Executes a data filter and returns an unordered rowset that contains the results.

This function only works with data filters that are based on data extensions. You can’t use this function with data filters that are based on profile attributes.

Use this function only on CloudPages, landing pages, microsites, and SMS messages created in MobileConnect.

The ExecuteFilter() function has one parameter:

  • dataFilterExternalId (string): Required. The external ID of the data filter to execute. This function only works with data filters that are based on data extensions.

This example uses a data extension called "MembershipRewardsProgramme," which contains the data in this table.

MemberIdFirstNameSurnameRewardsPointsRewardsTierArea
1DennisSmithers923742Chelsea
2PoojaChatterjee2010421Hammersmith
3TomásSantos693113Kensington
4Sun-HiKim239994Twickenham
5JianYeh151234Chelsea

The account also contains a data filter called "MembershipRewardsProgramme_50k points plus," with an external key of c5a7e0d9-41e0-4068-bdcc-8766d7c1af94. This data filter searches for all values in which the number in the RewardsPoints column is greater than or equal to 50000.

This code example filters the data extension based on the data filter.

The code example returns a table that contains values from the rowset.

RankMemberIdFirstNameSurnameRewardsPointsArea
11DennisSmithers92374Chelsea
22PoojaChatterjee201042Hammersmith
33TomásSantos69311Kensington