This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Introduction to patterns
Patterns are a powerful tool, which have a number of uses in the Snap program.
In data entry, patterns are attached to a specific variable to:
- Ensure that respondents or data entry personnel enter the correct format for information such as postcodes, zip codes or National Insurance numbers. Snap looks for a similarity between what has been entered as the answer to a question and what has been specified as a possible match in the pattern.
- Convert the data into a standard form even if it has been entered in an unsuitable format, such as pound or dollar signs being included in quantity data.
In filters and derived variables, you can
- Use any of the defined patterns to temporarily change data, for example, converting literal text to lower case
- Use a pattern made up of several defined parts to select one of the parts (e.g. the area code in a phone number) and use that part to analyse the data.
You can use the Patterns already set up in Snap and create your own using the Patterns dialog from .
The picture shows a pattern applied to q1a “Date of Visit” so that Snap only accepts dates in the DD/MM/YYYY format.

If the date is input in an incorrect format, an error message is displayed.
