Skip to end of banner
Go to start of banner

Example 6 - (Video) - 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 2 Next »

 

 

In this second example  we have taken the options for the Continent custom field from the database as well. The script used in this example are:

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;

For the moment, dependent fields can only be used by the two custom fields with autocomplete, and can only be referred in SIL data sources.

In order to get the value set on the screen for one custom field, you will have to refer it like this: "argv[customfield_id]"

  • No labels