---
title: "Adapt Power Custom Fields SIL scripts for Jira Cloud"
canonical: "https://support.appfire.com/space/PSJ/3792175281/Adapt+Power+Custom+Fields+SIL+scripts+for+Jira+Cloud"
format: markdown
---
> Macro (aura-html)

Data Center Power Custom Fields integrates with SIL scripts and field types that do not exist on Jira Cloud. This guide explains Data Center SIL dependencies and considerations for adapting scripts to Jira Cloud.

## SIL scripts that use Power Custom Fields

On Data Center, Power Custom Fields does more than add field types. It also plugs into the SIL engine, so **any SIL script** can work with PCF fields: Power Scripts listeners, post-functions, conditions, validators, scheduled jobs, and SIL Runner. None of this integration exists on Cloud.

### What Power Custom Fields adds to SIL on Data Center

| **Integration** | **What it does on Data Center** |
| --- | --- |
| `KPOption`** type** | A SIL struct with two string fields, `label` and `value`. It represents one option of a PCF select-style field. |
| **Field mappings** | Lets scripts read and write PCF fields with the usual `%key%.fieldName` / `issue.fieldName` syntax. |
| **Data-source scripts** | Select-style fields run a SIL script to build their option list. The script returns `string[]` (each string is both label and value) or `KPOption[]`. |
| **User picker scripts** | SIL User Picker fields run a SIL script per context to build the list of allowed users. |
| **SIL Script field scripts** | Calculate the value of SIL Script fields (see [PCF - SIL Script Custom Field](https://support.appfire.com/space/PSJ/3792076915/Power+Custom+Fields+migration+compatibility#PCF---SIL-Script-Custom-Field)). |


### How PCF fields look to SIL: Data Center vs Cloud

| **PCF field type** | **SIL type on Data Center** | **Native replacement on Cloud** | **SIL type on Cloud** |
| --- | --- | --- | --- |
| **All six select-style types** | `KPOption[]`, an array **even for single-value types** | Single select or radio buttons | `string` (option value) |
|  |  | Multi select or checkboxes | `string[]` |
| **PCF - Interval** | Interval | Number or Text | `number` or `string` |
| **PCF - SIL Script** | `string` | Text or Number | `string` or `number` |
| **PCF - Regular Expression** | `string` | Text | `string` |
| **PCF - SIL User Picker** | User (`string`) | User picker | `string` (Cloud account ID) |


### What breaks on Cloud

- `KPOption`** doesn't exist.** Scripts that declare `KPOption` variables or arrays won't compile.
- **PCF fields don't exist.** Reads and writes of PCF fields fail or return nothing, because the fields aren't migrated.
- **Data-source and user picker scripts have nowhere to run.** No Cloud field type calls a SIL script to build its options or allowed users.
- **SQL in PCF data-source configuration** does not run on Cloud. The field no longer calls your SQL. You can still use `sql()` in Power Scripts if you define the datasource in Power Scripts Cloud; PCF's per-field JNDI name and SQL text are not migrated.


### How to move your SIL scripts

1. **Find every script that uses PCF.** Search `silprograms` and your Power Scripts configuration for:
  - `KPOption`
  - PCF field names and IDs
  - scripts referenced by PCF field configuration (data source, user picker, SIL Script fields)
2. **Use SIL to snapshot values on Data Center.** `KPOption` is the easiest way to read select values before migration. For example, this copies the labels of a PCF multi select into a native multi select:
  For single-value types, the array has one element: `selected[0].label` or `selected[0].value`.
3. **Rewrite the scripts for Cloud.**
  - Replace `KPOption` with `string` or `string[]`, following the table above.
  - Point field references at the native fields you copied into.
  - On Cloud, native User fields use **account IDs**, not Data Center user keys. If you copied users into a native User field on Data Center before migration, rely on Cloud Migration Assistant to map them to the corresponding Cloud accounts. Otherwise, use SIL to map Data Center user keys to Cloud account IDs.
  - If shared helper code needs a label/value pair, you can declare your own `struct` with `label` and `value` fields. You still have to convert it to `string` or `string[]` before writing a native field.
4. **Replace data-source scripts.** Turn them into a scheduled Power Scripts listener that refreshes native options with `admAddCustomFieldOptions` / `admUpdateCustomFieldOptions` (see [Select-style fields](https://support.appfire.com/space/PSJ/3792076915/Power+Custom+Fields+migration+compatibility#Select-style-fields)). Use `sql()` only for databases reachable under Cloud security rules.
5. **Replace user picker scripts.** Turn the same logic into a workflow validator or listener (see [Restricting who can be chosen on Cloud](https://support.appfire.com/space/PSJ/3792076915/Power+Custom+Fields+migration+compatibility#Restricting-who-can-be-chosen-on-Cloud)).
6. **Archive the originals.** Keep the Data Center scripts for reference while you rebuild.

---


## Related migration guidance

- [Migrate Power Custom Fields from Data Center to Cloud](https://support.appfire.com/space/PSJ/3792306325/Migrate+Power+Custom+Fields+from+Data+Center+to+Cloud): Prepare, preserve, and verify field values.
- [Power Custom Fields migration compatibility](https://support.appfire.com/space/PSJ/3792076915/Power+Custom+Fields+migration+compatibility): Compare field types, limitations, and Cloud alternatives.
- [Adapt Power Custom Fields SIL scripts for Jira Cloud](https://support.appfire.com/space/PSJ/3792175281/Adapt+Power+Custom+Fields+SIL+scripts+for+Jira+Cloud): Review SIL mappings, code, and script replacements.