Drop-Down List
A dropdown list lets the user pick one or several alternatives from a fixed set of alternatives.
Single Choice
To restrict the user to picking a single alternative in a drop-down list, use the option input.
Figure 1. A drop-down list for selecting a single alternative, rendered in the browser.
Multiple Choice
To allow the user to pick an arbitrary number of alternatives from a drop-down list, use the options entry.
In the examples, note the s
at the end of options
. This is what distinguishes the multiple choice drop-down from the single-choice drop-down.
Data Source Dimensions
A common use case is when the end user should select a value from a Data Source. For example, the user should be allowed to pick one of the years for which there is data.
DataSource.groovy
void buildDimensionInput(
String inputName,
String dataMartName,
String dimensionColumnName
) {
def datamart = libs.Library_Queries.DataMart
def uniqueValues = datamart.getUniqueValues(
dataMartName,
dimensionColumnName
)
api.inputBuilderFactory()
.createOptionEntry(inputName)
.setOptions(uniqueValues)
.getInput()
}
During Input Generation
dataSourceInputs.buildDimensionInput(
'Year',
'Transaction',
'InvoiceDateYear'
)
, multiple selections available,
Related content
Item Picker Filters
Item Picker Filters
More like this
Advanced Configuration Options (Custom Form)
Advanced Configuration Options (Custom Form)
More like this
Custom Form Overview
Custom Form Overview
More like this
User Inputs & Forms
User Inputs & Forms
More like this
Lookup Tables / Company Parameters (Quick Reference)
Lookup Tables / Company Parameters (Quick Reference)
Read with this
Price List Item (PLI)
Price List Item (PLI)
More like this
Found an issue in documentation? Write to us.