Docs / Data extensions

LookupRows()

LookupRows is an AMPscript function in the data extensions category. Case-insensitive match.

Syntax

LookupRows(de, col, value, ...)

Example

%%[ 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 ]%%
Rendered output
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 signup

AmpSend 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.

Official Salesforce documentation

LookupRows in the official AMPscript reference - or browse the official index of AMPscript functions for platform behavior and edge cases.

Related data extensions functions