Tom, this can be done like this:
-
First form field, let's call it Frequency, is configured as:
- Data type: Text
- Form control: Drop-down list
-
Data source: list of options
- Has depending fields: true
-
Second form field, GeneratorModel is configured as:
- Data type: Text
- Form control: Drop-down list
- Data source: SQL Query (will be below)
- Depends on another field: true
Query:
select GeneratorCode, --this is drop-down item value
GeneratorName --this is drop-down item display name
from customtable_Generators
where GeneratorFrequency = '{% Fields["Frequency"].Value #%}'
When you configure form fields, you can use this macro to get the value of another field on the same form: {% Fields["Frequency"].Value #%}