---
title: "PCF - SIL User Picker"
canonical: "https://support.appfire.com/space/PSJ/1589020497/PCF%20-%20SIL%20User%20Picker"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)




4. Click **Save**. The script you provided is associated with the current custom field. The values returned by the script are the values available for the custom field.
5. (Optional) In the *Filtering Strategy *tab, enable filtering and configure filters based on your requirements. You can create filters based on users' group or role.

![Filtering Strategy tab on PCF - SIL Script Custom Field configuration page.](media://09e091df-eaa5-4d36-8678-140d194de887)

In this example, the PCF - SIL User Picker custom field is configured to filter only users that are members of the *jira-software-users* group and have *Administrator* role.

6. In the *General* tab, set a default value for the field.
7. Click **Save**.

---

## How the field displays

1. After configuring the field, go to an issue and open it for editing. This is an example of how the PCF - SIL User Picker field displays on the edit issue screen:

![PCF - SIL Script Custom Field on edit issue page](media://10591568-f5b4-40cf-be6f-346239e9cd55)

2. Type at least two characters in the field to display matching users.
3. Select a user from the dropdown list.
4. Update the issue.
5. View your selection in the **People** section of the **View Issue** screen

![image-20240213-153015.png](media://b8930c5a-7248-4386-84eb-cbd11f73120b)

4. To edit the field on the **View issue** screen, click the inline edit icon next to the field. A dropdown list will show filtered users based on your SIL script.

## Examples

| **Example** | **Sample script** | **Sample display output** |
| --- | --- | --- |
| Display all issue assignees Age | This script retrieves all users who have been assigned to an issue, including both current and previous assignees.<br>```
string[] assignees;
assignees = addElementIfNotExist(assignees, assignee); 
string[] assigneeHistory = fieldHistory(key, "assignee"); 
for(number i = 1; i < size(assigneeHistory); i = i + 2) {
 string assigneeName = getElement(assigneeHistory, i);
 assignees = addElementIfNotExist(assignees, assigneeName); 
}
return assignees;
``` | "gsmith, mjohnson, awhite" |
| Display users in a specific project role | This script returns all users who have the "Developers" role in the current project.<br>```
return usersInRole(project, "Developers");
``` | "jsmith, bjones, mwilson" |
| Display users in group | This script returns all users belonging to a specified group.<br>```
return usersInGroups("jira-developers");
``` | "tdoe, rjohnson" |

---

## Configure search settings for your PCF - SIL User Picker custom field

When created, the PCF - SIL User Picker custom field comes with two default searchers: **SIL User Picker** and **Group Searcher**. Together, they filter users according to your configured SIL script.

- When using the SIL User Picker and Group Searcher in the search interface (issue navigator), the available user options are determined by the SIL script defined in your field's global configuration.
- If your SIL script uses issue-specific variables (such as project, key, assignee, or reporter), you must use the standard User Picker and Group Searcher instead. Otherwise, you won't be able to select values for filtering.

1. Locate your PCF - SIL Script Custom Field on the **Custom fields** page and click **Edit details**.
2. Select a **Search Template **compatible with your field's return value type.
3. Click **Update**.

> ✅ After the update, reindex your Jira instance to ensure search functionality works correctly.

4. Test the search functionality by performing a search for all issues containing the value you want for that custom field.

> ℹ️ To learn more about the search functionality, see the Jira [Searching for Issues](http://confluence.atlassian.com/display/JIRA/Searching+for+Issues) tutorial.