---
title: "Checking the value of a multi-valued field"
canonical: "https://support.appfire.com/space/JMWEC/465242189/Checking%20the%20value%20of%20a%20multi-valued%20field"
format: markdown
---
> Macro (aura-html)

### Abstract

This code snippet checks the value of a standard or custom multi-valued type field (typically a [multi-select field](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465505179)). The multi-valued fields can either be an array of objects or an array of values.

### Logic

Iterate over the array of objects or values and check a specific field for the required value.

### Snippet

#### For multi-select fields:

```javascript
{# Checks if a specific option is selected #}
{{ issue.fields["<Name of the field>"] | find({"value":"<Value of the desired option>"}) != null }}
```

##### Placeholders

| **Placeholder** | **Description** | **Example** |
| --- | --- | --- |
| `<Name of the field`> | Name of the multi-select field | `Checkboxes` |
| `<Value of the desired option>` | Value of the option. | `Verification done
` |

#### For multi-versions/users/components/groups fields (e.g. Fix Version/s):

```javascript
{# Checks if a specific version is selected #}
{{ issue.fields["<Name of the field>"] | find({"name":"<Name of the desired version>"}) != null }}
```

##### Placeholders

| **Placeholder** | **Description** | **Example** |
| --- | --- | --- |
| `<Name of the field`> | Name of the multi-valued version field | `fixVersions` |
| `<Name of the desired version>` | Name of the version to find | `2.0
` |

#### For Labels field:

```javascript
{# Checks if a specific label is present #}
{{ issue.fields["<Name of the field>"] | find("<Desired label>") != null }}
```

##### Placeholders

| **Placeholder** | **Description** | **Example** |
| --- | --- | --- |
| `<Name of the field`> | Name of the labels field | `Labels` |
| `<Desired label>` | Label to find | `New` |

### Examples

The output of this snippet is a boolean value (`true` or `false`) <span style="color: #333333">which you could use to c</span><span style="color: #333333">onditionally execute a Post-function or Unlink issues:</span>

- Check the issue has been flagged
- Check the issue has a label `Server`
- The issue has `5.0.0` as an Affects Version/s

### References

- [Using Nunjucks Templates](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465503811)
- [Accessing the standard fields](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466225701)
- [find filter](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465373638)

### Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |