---
title: "Add and configure a new Power custom field"
canonical: "https://support.appfire.com/space/PSJ/1589019449/Add%20and%20configure%20a%20new%20Power%20custom%20field"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)




Each Power custom field type provides configurable selection options for specific use cases. The table below provides a brief description of the available types. 

> ℹ️ See the individual PCF configuration page for custom field-specific configuration details and examples.

| **Power custom field type** | **Description** |
| --- | --- |
| [PCF - Checkbox](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019950) | Provides multiple-option selection from a dynamically populated list. |
| [PCF - Interval Field](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589020426) | Displays a Jira-style interval field. |
| [PCF - Multi Select](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019824) | Provides multiple-option selection from a dynamic data source. |
| [PCF - Multiple Autocomplete](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019900) | Provides multiple-option selection from a dynamic data source using autocomplete. |
| [PCF - Radio Buttons](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019995) | Provides single-option selection using radio buttons populated by a dynamic data source. |
| [PCF - Regular Expression Custom Field](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589020270) | Provides text field validation based on a regex pattern. |
| [PCF - SIL Script Custom Field](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589020045) | Provides field input calculated using a SIL script. |
| [PCF - SIL User Picker](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589020497) | Provides a popup picker for user selection, where available users are determined by a SIL script |
| [PCF - Single Autocomplete](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019773) | Displays a dropdown select list populated from a dynamic data source. |
| [PCF - Single Select](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019720) | Displays a dropdown select list of options generated by a Simple Issue Language (SIL) script |

6. Give your field a name and description, then click **Next**.
7. Configure the issue type context for the new Power custom field.
8. Click **Create**.
9. Associate the field with the required screens, then click **Update**.

> 📝 Until associated, the field is not visible on screens. Once associated, it appears at the bottom of the issue view.

The new Power custom field has been created and appears on the **Custom fields** page. 

---

## General configuration settings for the new Power custom field

Once your Power custom field is created, you can start configuring its settings. It is recommended that you complete the configuration steps in the order they are presented.

To access the configuration settings, locate the field in the **Custom fields** page in Jira Administration console and select **Configure contexts** from its respective **Actions** () menu. 

![This screenshot shows the Configure context menu link in the Actions menu list for a custom field.](media://bbb42064-421a-4c18-a8a3-e08ee97dee60)

For each context (the combination of projects and issue types where that field can be used), you can set:

- Default values: what is pre-filled when the custom field is displayed.
- Data options: what users can choose from (if the custom field type uses options).

![image](media://1792ea52-e03f-4ad8-889e-771e78a38c6d)

> 📝 Most custom fields require the general configuration settings described here. The following Power custom fields are an exception; their default and data options configurations are done differently:
> 📝 
> 📝 - PCF - Regular Expression Custom Field
> 📝 - PCF - SIL Script Custom Field
> 📝 - PCF - SIL User Picker
> 📝 
> 📝 For detailed instructions, refer to their configuration guides.

---

### Set default value

> 📝 If your data source requires an issue key, the default value selection won't work on the configuration page because no issue context is available.

To set the default pre-filled value for your Power custom field:

1. Click **Edit Default value**.
2. Start typing to select an option from the drop-down list.
3. Click **Set Default**.

---

### Select a data option template 

You can select a data option type for your Power custom field from a list of pre-configured templates. You can use any option type with any custom field type. To select a template for a newly created Power custom field:

1. In the contexts configuration page of the Power custom field, click **Edit Field data settings**.

> 📝 The templates are displayed only the first time you open the Field data settings page for a new Power custom field. Once the template is set, clicking the **Edit Field data settings **link opens the Power custom field configuration **Summary **page (see screenshot below).

2. Click the option template you want to choose for your Power custom field. You can use any option type with any custom field type.

| **Data option type** | **Description** |
| --- | --- |
| User (User Picker) | Provides a selection of users from your Jira instance. |
| Issue (Issue Picker) | Provides a selection of issues from your Jira instance. |
| Component (Component Picker) | Provides a selection of components from your Jira project.<br>> ℹ️ After creating the Power custom field, set your project key in the SIL script data source. |
| Group (Group Picker) | Provides a selection of groups from your Jira instance. |
| Project (Project Picker) | Provides a selection of projects from your Jira instance. |
| Version (Version Picker) | Provides a selection of versions from your Jira project.<br>> ℹ️ After creating the Power custom field, set your project key in the SIL script data source. |

For additional information and examples, see [Option types](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019660).

2. Click **Choose Template**.

You have now set the option type for your Power custom field. All required properties are set automatically and displayed in the **Summary** page as illustrated in the example below.

![pcf-config-summary.png](media://a57fcafe-7267-4be4-bb8f-f60741c27ea9)

  


3. Click **Configure**.

---

### Change the option type

Once you choose the data option type template for your Power custom field, you can change it only to a string, which is the default option type. You can change a string option type to any supported option type.

> ℹ️ For details, review the [Supported option types by custom field type](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019660/Option+types#Supported-option-types-by-custom-field-type) section in the [Option types](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019660) page.

> ⚠️ Before proceeding with this task, check if your data source supports the new option type.
> ⚠️ 
> ⚠️ Changing the data option to another type can invalidate existing field values that do not match the data source options configured for the Power custom field. You will be prompted to synchronize field values to keep matching values and remove invalid ones.

1. Open the Power custom field configuration settings.
2. In the *Option Type**** ***section of the page, expand the drop-down menu as shown in the screenshot below.
  
3. Select the new data option type.
4. Click **Save**.
5. You are prompted to synchronize the existing values of the Power custom field.


![This screenshot shows the field synchronization prompt that opens when you change the option type of a Power custom field.](media://618bfaa4-62bb-43e1-b5e1-903f93537ac6)


- To keep matching fields values and remove invalid values, click **Save and sync**.
- To save the configuration without synchronization, click** Save**. You can run a sync later from the **Maintenance** tab of the Power custom field configuration page.

---

### Configure the data source

The data source populates the Power custom field with values. You select and configure the data source for your Power custom field in the *Data Source**** ***section of the field configuration page.

![pcf-sil-data-soruce-settings.png](media://fd2e7837-7de2-49e9-89fd-50c72628e784)


1. (Optional) Toggle on if you want to have “None” to display as a valid option for data sources in the custom field’s configuration summary.
2. Select a data source type and configure the required settings.

> ℹ️ See the individual data source type page for additional details.

| **Data source type** | **Description** |
| --- | --- |
| [SIL Data Source](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019574) | SIL data source lets you use a SIL script to populate Power custom fields. The SIL script runs each time you modify the custom field.<br>The **Select a SIL script as data source** field displays the path to the generated SIL script location.<br>- To view the location of this automatically generated script or select another script, click the **Edit** () icon.<br>![This screenshot shows a dialog window with the silprograms file tree where you select a SIL script as data source.](media://4d5084c2-1fd6-423e-ada0-741d39e7788e)<br>You can write your own SIL scripts to retrieve and display data from databases (using the [sql](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15489917) function), files, or legacy systems.<br>- To view or modify the SIL script, go to **Manage apps** > **SIL Manager** and locate the scrupt in the corresponding custom field folder/subfolder under **silprograms**.<br>![This screenshot shows the SIL script used as data source open in the SIL Manager.](media://d5362a0b-c653-4b93-b2dd-70a1adf0d45a)<br>> ℹ️ A script used as a data source can return either a string array or a KPOption array. For additional information, see [Return types](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019574/SIL+Data+Source#Return-Types).<br>> ℹ️ When you modify a custom field's value (either through inline editing or the edit issue screen) and save your changes, the **argv** parameter in your SIL script is automatically updated to contain both the field's previous value and the newly set value. This parameter can be accessed in your script using:
> ℹ️ 
> ℹ️ - `argv["oldValue"]` for the previous value
> ℹ️ - `argv["newValue"]` for the updated value |
| [SQL Data Source](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019609) | SQL data source uses database queries to populate custom fields with values.<br>![sql-data-source-settings.png](media://ad7e1d95-ffd4-4f2a-9e11-4618df2822a0)<br>To set up the database connection:<br>- Provide your database resource name in the **Data source name or JNDI **field. Use a JNDI lookup name (like 'jdbc/MyDatabase') or a direct data source name.
- To set up a new data source, click the **Create new data source **link. For detailed instructions, see the [Configuring data sources](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15486115) page.<br>To configure database filtering:<br>- In **SQL Initial Script **field, enter an SQL query for initial database filtering. The script runs with autocomplete or when minimum characters is set to 0.
- For Power custom fields with autocomplete, you can add your own script in the **SQL Autocomplete Script** field. |

3. If applicable, add fields as dependent fields to use their values in your data source.  
When a dependent field's value changes, the current field automatically updates its options based on the new value.

> ℹ️ The **Dependent fields **setting is available only for Power custom fields of the following type:
> ℹ️ 
> ℹ️ - PCF - Single Select
> ℹ️ - PCF - Single Autocomplete
> ℹ️ - PCF - Multi Select
> ℹ️ - PCF - Multiple Autocomplete
> ℹ️ 
> ℹ️ For additional information, see [examples](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589021259) of using dependent fields and refer to the individual Power custom field [usage guides](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019699).

4. (Optional) Configure the validation settings for your Power custom field by choosing one of the available **Select validation type **options.  
Power custom field validation is a way to verify that values in your field match permitted options from your data source.

| **Validation type** | **Description** |
| --- | --- |
| No validation (default) | Values are accepted without checking. |
| Data source options | Values must match a predefined list from your data source. |
| Data source options with query | Values are validated by querying your data source directly. Recommended for autocomplete fields. |

6. Click **Save**.

---

### Additional settings

Configure these optional settings to customize the behavior and data handling of your scripted field. 

![pcf-config-additional-settings.png](media://ea693568-29e9-4262-9d06-d5430176e804)

| **To…** | **Do this…** |
| --- | --- |
| To run a script when the field changes | Click the **Edit** icon next in the **Update script** field and select a SIL script that will run when you save/update an issue where this custom field has been changed.<br>> ✅ The Update script is particularly useful for triggering automated actions when your custom field value changes, such as updating related fields or sending notifications. |
| To run the **Update script **on every save | Toggle **Always run update script** on so the script will run every time you save changes to this field via inline editing, even when the value doesn't actually change. |
| Set the export format | Select an **Export format** from the dropdown to determine how the custom field data is exported in your reports and data exports.  
Power Custom Fields offers multiple formats for exporting field data:<br>- **Historical**: The original app format with label and value
  `Label [Value]`
- **JSON**: Complete data structure in JSON format
- **Labels**: Only field labels without values
- **Values**: Only field values without labels |

When ready, click **Save** to apply the changes.

---

### Configure autocomplete

> 📝 These settings are available only for Power custom fields of the following type:
> 📝 
> 📝 - PCF - Single Autocomplete
> 📝 - PCF - Multi Autocomplete

1. On the Power custom field configuration page, select the **Autocomplete settings **tab.

![This screenshot shows the settings on the Autocomplete tab of the Power custom field configuration page.](media://78e5a04b-bd35-4ee3-84d6-c01a2658788d)


2. Adjust the required settings:

| **Autocomplete setting** | **Description** |
| --- | --- |
| Minimum characters | Set minimum number of characters required to trigger autocomplete. |
| Maximum results | Set maximum number of results to display. |
| Filtering strategy | Select how to filter options:<br>- **Implicit**: Automatically filters by matching labels
- **Data source**: Uses your data source query for filtering<br>> 📝 If you have configured the SQL Data Source type for this field, the **Filtering strategy **is set to **Data source** by default. |

3. Click **Save**.

---

## Additional information

> Macro (children)