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


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | isCustomFieldInContext(customFieldAsString, projectKey, issueTypeName) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Checks if a custom field is in the context of a specified issue type for a project.

Checks if a custom field is in the context of a specified issue type for a project.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| customFieldAsString | String | Yes | Name, id (as "customfield_xxxxx") or alias of the custom field. |
| projectKey | String | Yes | Project key to check. |
| issuetypeName | String | Yes | Name of the issue type. |

## Return Type

**Boolean**

Returns "true" if the custom field is in context and "false" otherwise.

## Example

```
if(isCustomFieldInContext("My Custom Field", "PRJ", "Bug")){
	#{My Custom Field} = "I'm here";
} 

if(isCustomFieldInContext("customfield_10000", "PRJ", "Improvement")){
 customfield_10000 = "I'm here";
} 

if(isCustomFieldInContext("aliasOfMyCustomField", "PRJ", "Bug")){
 aliasOfMyCustomField = "I'm here";
}
```

## See also

> Macro (contentbylabel)