AMPscript lets you personalize emails and landing pages in Marketing Cloud. These ten functions cover most everyday needs.
Data lookup functions
- Lookup() returns one value from a data extension.
- LookupRows() returns several matching rows.
- Row() picks one row from a rowset.
- Field() reads a column from that row.
- RowCount() tells you how many rows came back.
%%=Lookup("Customers","FirstName","Email",emailaddr)=%%
Logic and formatting
- IIF() is a quick inline if/else.
- Concat() joins text values together.
- Format() formats dates and numbers for display.
- DateAdd() adds days, months or years to a date.
- ProperCase() tidies names such as “john smith”.
Practice tip
Always test with Preview and Test, and use sample data that includes empty values. Most AMPscript bugs come from missing data rather than wrong syntax.
Want to learn this hands-on? Our trainers cover it with live projects. Explore courses →
