Using the foreach placeholder

Training course

You can insert repetitive data from an IQA query by using only one small line of "code" in a communication called the "for each placeholder." An example of repetitive data in an IQA query is something like a query that returns multiple rows for a single contact, with each row containing all of the program items an event registrant is registered for.

For this example, the Annual Conference event is coming up and you want to remind registrants of the registration options and program items they registered for. Instead of manually typing out each registration option and program item for each registrant, you use the foreach placeholder. This placeholder allows you to neatly insert repeated data from a query.

The foreach placeholder is borrowed from JavaScript. For our purposes, the foreach method will grab each program item for an event and then organize the information per registrant in each communication.

Warning! The foreach placeholder cannot be used in Advanced Email Marketing communications.