Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
In the Power Customer Fields example using continents countries and countriesletters, you can elect a country (or several countries) select a letter in a custom field based on a continent you select country selected in a different custom field.
The following video has information about how dependent fields work.
.
vmScript details
The options for the Continent Country custom field were taken from the database. The following scripts are used in this example:
ContinentCountry data source
Code Block |
---|
string[] continents = sql("myDBreturn {"Romania", "France", "Norway", "select distinct continent from countries"); return continents; |
Spain"}; |
Letters data source
Code Block |
---|
string[] continentletters = argv["customfield_10109"]; //the dependent field string[] countries = sql("myDB", "select country from countries where continent = '" + continent + "'"); return countries{}; string cfname="Country"; for(int i=0; i<length(argv[cfname]); ++i) { letters += argv[cfname][i]; } return letters; |
See More
Child pages (Children Display) | ||
---|---|---|
|