Hi All,
I am getting the below error ,
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!dropdownField [line 143]: Example can only be indexed into using square brackets or the index function
I tried to pass the values of the record type query list values to a local variable and when trying to pull using dot notation or index function in a!dropdown component ,
a!localVariables( local!List: a!queryRecordType( recordType: 'recordType!Example', filters: { a!queryFilter( field: 'recordType!Example.fields.Flag', operator: "=", value: true), a!queryFilter( field: 'recordType!Example.fields.Date', operator: ">=", value: ri!StartDate, applywhen: (if(isnull(ri!StartDate), false, true)) ), a!queryFilter( field:'recordType!Example.fields.Date', operator: "<=", value: ri!EndDate, applywhen: (if(isnull(ri!EndDate), false, true)) ) }, fields: 'BU', pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500) ).data, a!dropdownField( label: " Unit", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", choiceLabels: local!List.BU, choiceValues: local!List.BU, value: ri!BusinessUnit, searchDisplay: "AUTO", validations: {} ) )
I read this post https://docs.appian.com/suite/help/21.4/reference-records.html#referencing-record-fields-and-field-values , but still no luck . Any pointers or suggestions will be helpful.
Thanks,
Priyanka
Discussion posts and replies are publicly visible
As in the documentation, change
local!List.BU
to
local!List[RecordType!Example.fields.BU]
I see multiple issues here:
Single inverted comma(') should not be here on top of recordtype.
priyankav4295 said:'recordType!Example.fields.Flag'
Field should be under recordtype. Example recordType!Example.field.BU
priyankav4295 said:fields: 'BU',
Under dropdown, use [recordType!Example.field.BU] for choice labels & values.
priyankav4295 said:local!List.BU
For more:- Appian Records - Appian 22.3
Unknown said:Single inverted comma(') should not be here on top of recordtype.
AFAIK this is how the 'recordType!' namespace objects evaluate when copied-and-pasted out to plaintext.
Oh Okay, Thanks for the correction.