Docs / Data extensions
LookupRows is an AMPscript function in the data extensions category. Case-insensitive match.
LookupRows(de, col, value, ...)
%%[ SET @orders = LookupRows("Orders", "Email", emailaddr)
FOR @i = 1 TO RowCount(@orders) DO
SET @row = Row(@orders, @i) ]%%
Order %%=Field(@row, "OrderId")=%%: $%%=Field(@row, "Total")=%%<br>
%%[ NEXT @i ]%%
Order 1001: $12.50<br>
Order 1002: $49.95<br>
Output produced by AmpSend's AMPscript engine (validated against Salesforce's own test corpus) - not a hand-written result.
Try LookupRows in the editor - free, no signupAmpSend runs AMPscript entirely in your browser: instant preview, named test scenarios, shared content blocks and data extensions, and an AI assistant that knows every supported function. Nothing leaves your machine.
LookupRows in the official AMPscript reference - or browse the official index of AMPscript functions for platform behavior and edge cases.