---
title: "Scripting support for Power Custom Fields"
canonical: "https://support.appfire.com/space/PSJ/1589021032/Scripting%20support%20for%20Power%20Custom%20Fields"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)



After you install Power Custom Fields, you can access the custom fields using the standard syntax: *customfield_<id>*.

The field’s value is always an array of [KPOption](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=~712020fcc5c9e4146a4e49a90652548b0cae22&title=Add%20and%20configure%20a%20new%20Power%20custom%20field) that represents the selected options in the field.

#### Example

```
//simple example on how to access (get/set) Power Custom Fields fields

//we assume we have an issue context here
KPOption [] options = customfield_12345;

if(size(options) > 0) {
    runnerLog("First option id = " + options[0].value + " and the label is :" + options[0].label);
}

//we'll assume this is a multi-select field, because otherwise it will not work
KPOption nopt;
nopt.label = "Extra topping";
nopt.value = "99";
options += nopt;

customfield_12345 = options; //here's the set
```