Variables are a computational mechanism in Pollsar that allows you to collect, store, and use values during survey completion. With variables you can calculate scores, personalize question texts, control branching logic, and create interactive scenarios.
All variables are global — they are available in all parts of the survey at any point during completion. To insert a variable value into a question text, title, or page, wrap its name in curly braces: {variable_name}.
User variables are created manually by the author in the survey settings (Settings button → User Variables tab).
Enter the name of a new variable in the input field. The name can consist of Latin letters, digits, and underscores. If you enter a name in another language, the system will automatically transliterate it to Latin characters.
The default initial value is 0. It can be changed in the variable settings. Variables are untyped — they accept both numeric and text values depending on context.
More on calculations in the article "Function — calculations with variables". On condition checking — in the article "Rule — conditional rules".
System variables are created automatically with the survey. Their values are determined during completion and cannot be changed by the author.
System variables can be used in texts and logic just like user variables.
User and system variables are visually distinct in the interface. In logic settings, user variables are highlighted with a green badge, while system variables have a yellow badge. System variables are also easy to recognize by the ps_ prefix in their name.
In the variable dropdown list (text formatting panel), user variables are shown in green text, system variables in dark text.