Expressions let you insert dynamic values, run calculations, and apply logic inside messages, rules, and action fields. In this guide, you’ll learn the core @(…) syntax, how to reference variables like @contact and @results, and how to call supported functions safely while avoiding common syntax mistakes.
Basic Syntax: How to Use Variables (@contact, @results) and Functions
Expressions let you transform data and compute values inside your flows—similar to Excel formulas. Use expressions when you need functions (like upper()), math, date logic, or conditional formatting. In RapidPro.app, expressions are wrapped in @(…) so the platform knows exactly what should be evaluated.
Response Control: Limiting Attempts with the @node.visitcount Expression
In quizzes, surveys, and eligibility checks, it’s often useful to limit how many times a contact can retry a question. You can do this by using the @node.visitcount expression in a Split by Expression node to track how many times a contact has visited a specific node during the current flow run, then route them once they exceed your allowed attempts.
Date and Time Calculations: Adding, Subtracting, and Modifying Time Values
Date & time arithmetic expressions let you calculate, adjust, and compare dates and times dynamically. They’re commonly used to schedule follow-ups, calculate durations, adjust timestamps, and build time-based logic in flows and campaigns—all evaluated at runtime using expressions.
Date and Time Calculations: Adding, Subtracting, and Modifying Time Values
Date & time arithmetic expressions let you calculate, adjust, and compare dates and times dynamically. They’re commonly used to schedule follow-ups, calculate durations, adjust timestamps, and build time-based logic in flows and campaigns—all evaluated at runtime using expressions.

