Hi all,
I'm going crazy about this: I want a multiple dropdown be populated by a d query on a data store:
local!config: a!queryEntity( entity:local!dse[ri!dse], query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn(field: ri!fieldName, isGrouping: true) } ), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1) ), fetchTotalCount: false ).data[ri!fieldname],
and this is my dropdown configuration:
a!multipleDropdownField( data:null, placeholder:"null", choiceValues:local!config, choiceLabels:local!config, label: "", labelPosition: "ABOVE", value: ri!value, saveinto: ri!value, searchDisplay: "AUTO", marginBelow: "NONE" )
but in test display it generate this error:
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!multipleDropdownField [line 4]: A multiple dropdown component [label="Multiple Dropdown"] has an invalid value for "choiceValues". Choice values cannot be null.
but on the right side of my screen I can see that the config variable is correctly populated.
Can anyone help me, please?
Maria Giuseppina
Discussion posts and replies are publicly visible
This works for me:
Are you sure that everything is OK with your local!config?
Thank you Stefan,
also for me it works if choice labels and values are defined this way. The problem seems to be related to obtaining lists by a query on a data store entity
to double check, try wrapping your query result in the function "toUniformString()", which typecasts an array as string safely (dropdowns can be finnicky about weird data types sometimes).
Tough to say anything without seeing the actual data.
We need to see more. Could it be that one of the values in the list is NULL?
Oh, yes, you are right! There is a null value
Thank you very much!