---
title: "lfRestrictSelectOptions"
canonical: "https://support.appfire.com/space/PSJ/15480502/lfRestrictSelectOptions"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | lfRestrictSelectOptions(field, options, [triggerChange]) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Restricts certain options from the list of options for the field.

Restricts certain options from the list of options for the field.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| field | String | Yes | Field to restrict options for |
| options | String | Yes | List of options to restrict |
| triggerChange | Boolean | No | If set to true, it triggers the change event on the field when function is used. |

## Return Type

**None**

## Example

The following code example restricts **Major** and **Minor** from the options of the standard **Priority** field.

```javascript
lfRestrictSelectOptions("priority", {"Major", "Minor"}); //where field = "priority" and options = "Major" and "Minor"
```

If you want to trigger the change event on the field when using lfRestrictSelectOptions, you can use the optional triggerChange parameter set to "true".

```javascript
lfRestrictSelectOptions("customfield_10000", {"option1", "option2"}, true);
//where field = "customfield_10000" of type select list, options = "option1" and "option2" and triggerChange = true
```

## See also

> Macro (contentbylabel)