Skip to end of banner
Go to start of banner

Example 8 - Dependent fields and SQL data sources

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Required apps

  • Power Custom Fields Basic
  • Power Custom Fields Premium

In order to use dependent fields you must have Power Scripts for Jira app installed and enabled.

To use the screen values for a field in the data source, add it as dependent field from the field configuration > Dependencies.

 

Example: Let's say we have two custom fields: PCF - Single Autocomplete (let's name it Continent) and PCF - Multiple Autocomplete (let's name it Countries), the second one is populated depending on the value of the first one.

An easy example is following: we have a "countries" table with two columns: country and continent. Our first field will select the continents and the second one will contain the countries from that continent.

The following data source represents the first custom field:  

select distinct continent from countries;


The following data source represents the second custom field:  

select country from countries where continent = {customfield_10800}


The following result will be in the issue view screen: 


For the moment, dependent fields can only be used by the two custom fields with autocomplete.

Starting with Power Custom Fields PRO 4.0.0, you can use the dependent fields on SQL data sources as well.

In order to get the value set on the screen for one custom field, reference it like this: "argv[customfield_id]".

See also

  • No labels