Skip to end of banner
Go to start of banner

Example 6 - More dependent fields

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 6 Current »

In the Power Customer Fields example using continents and countries, you can elect a country (or several countries) in a custom field based on a continent you select in a different custom field.

The following video has information about how dependent fields work.

Script details

The options for the Continent custom field were taken from the database. The following scripts are used in this example:

Continent data source

string[] continents = sql("myDB", "select distinct continent from countries");
return continents;

Country data source

string continent = argv["customfield_10109"];	//the dependent field
string[] countries = sql("myDB", "select country from countries where continent = '" + continent + "'");
return countries;

  • No labels