In order to use the screen values for a field in the data source, you have to add it as dependent field.
Example: Let's suppose we have two custom fields: one KCF - Single Autocomplete and one KCF - Multiple Autocomplete, the second one is populated depending on the value of the first one.
An easy example would be: the first custom field has two options: 0 and 1, and the second one contains the numbers between 0 and 100 whose rest of division at two, depending on the value selected on the first one.
You can see the corresponding data sources below:
The data source for the first custom field:
return {0,1};
The data source for the second custom field:
number[] res; string x = argv["customfield_10101"]; for (number i = 0; i < 100; i++) { if (i % 2 == x) res += i; } return res;
In the issue view screen, the result would look like this:
, respectively