---
title: "Create a Select All option in a dropdown list"
canonical: "https://support.appfire.com/space/PSJ/15480830/Create%20a%20Select%20All%20option%20in%20a%20dropdown%20list"
format: markdown
---
> Macro (aura-html)

 

## Listener script

This script listens for a change to **customfield_10712** and runs the SelectAllInList.sil script when a change is detected.

```
lfWatch("customfield_10712", {"customfield_10712"}, "Screen_Listeners/SelectAllInList.sil", "change");
```

## Script

This script is run from the SelectAllInList_watch.sil listener script. It selects all items in a list if the **Select All** array value is set.

```
string [] c = argv["customfield_10712"];
string [] colors = {"Black", "Blue", "Brown", "Green", "Orange", "Red", "Yellow", "White"};

if(arrayElementExists(c, "Select All")) {  
    lfSet("customfield_10712" , colors);
}
```