0

Is there a way to use multiple criteria when using the lookuprows ampscript function?

Example (which SFMC gives an error in that I can’t use the same column twice):

%%[

set @Category = "News"
set @Category2 = "Events"
set @rows = LookupRows("Content","Category", @Category,"Category", @Category2)

]%%

My work around is doing two Lookuprows with two FOR Loops which feels extremely inefficient.

3
  • 3
    LookupRows and all the other AMPscript lookup functions use AND operators with exact matches. Jul 6, 2022 at 1:38
  • Thank you @AdamSpriggs I will try this out later today.
    – TimZ
    Jul 6, 2022 at 14:52
  • @AdamSpriggs I tried linking two LookupRows with an "And" and that didn't give me an error in Preview & Test, but the row count didn't combine and so the use case didn't render. So is it not possible to look up multiple values in a single column?
    – TimZ
    Jul 6, 2022 at 23:43

0

You must log in to answer this question.

Browse other questions tagged .