QuestionQ84

Scripting and Automation

Northern Trail Outfitters wants to exclude, at send time, recipients who have a record in the Exclude Data Extension. The primary key of this data extension is SubscriberKey.

How should a developer write the Exclusion Script?

  • A Rowcount(LookupRows('Exclude', 'SubscriberKey', _SubscriberKey)) > 0
  • B Lookup('Exclude', 'SubscriberKey', 'EmailAddress', emailaddr_) == emailaddr_
  • C RowCount(LookupRows('Exclude', 'SubscriberKey', _SubscriberKey)) > 1
Explanation

LookupRows('Exclude', 'SubscriberKey', _SubscriberKey) retrieves rows whose SubscriberKey matches the sending subscriber. RowCount(...) > 0 evaluates true when at least one exclusion record exists. A primary key permits at most one matching record, so testing for more than one row would not identify an excluded subscriber. Salesforce documents that LookupRows() returns a rowset matching the supplied criteria and that RowCount() returns the number of rows in that rowset.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!