---
title: "getProjectsInCustomFieldContext"
canonical: "https://support.appfire.com/space/PSJC/1342671544/getProjectsInCustomFieldContext"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Returns the list of project keys for a certain custom field context. Note that if the routine does not return anything then the context is global. You can use the allProjects routine to get all the projects.

Returns the list of projects for a certain custom field context

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getProjectsInCustomFieldContext(customFieldId, context) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| customfieldId | String | Yes | The id of the custom field (format: customfield_xxxxx) |
| context | String | Yes | The id or the name of the custom field context |

## Return Type

**String []**

## Examples

```javascript
return getProjectsInCustomFieldContext("customfield_10041", "10169");
```

ITSD|TEST

```javascript
//global, should return []
 return getProjectsInCustomFieldContext("customfield_10040", "10167");
```

## See also

> Macro (contentbylabel)