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.
From Power Custom Fields PRO 4.0.0, you can now 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]".