---
title: "LIST"
url: "https://help.formsfly.com/en/article/list"
language: "en"
last_updated: "2024-11-04T09:19:44.483Z"
---

# LIST

Collects answers from fields with data names matching the given regular expression pattern.

* * *

Syntax  
`LIST(pattern, 'optionalFilterFormula')`

### Example

```plaintext
 SUM(LIST('q[0-9]+')) sums answers for fields named q1, q2 etc
 
 COUNT(LIST('q[0-9]+', '{{this}} = 5')) counts q1,q2 etc fields where answers equal to 5
```

### Notes

List results are typically used with functions like SUM()/COUNT() to calculate results on fields that follow a common naming convention - e.g. survey fields like q1, q2, q3 etc.

Second optional parameter applies a filter formula to the answers gathered, leaving only answers that pass the condition. Use {{this}} to refer to the answer value in formula.

### Related

[TOLIST](https://help.formsfly.com/en/article/tolist)  
[TOLIST (Multi-field)](https://help.formsfly.com/en/article/tolist-multi-field)
