Hi,
I have RecordType based grid (the recordType is called "CJT_R_Vehicles").
The multiple grid selection is saved into a "selectedVehicles" local variable.
Then I need the selectedVehicles to be passed to an ER.
- What is the RI Type you would select in the ER to store the selection lines ?
CJT_R_Vehicles
CJT_R_Vehicles (array)
RecordType RecordType (array)
- In the ER, how you would manipulate the RI (vehicle lines) ?Let's say I need to index some fields, how would you do ?
I'm just curious because with this kind of type, we can not manipulate them with string fieldnames, without to be exposed to this error :CJT_R_Vehicles must be indexed by its corresponding record type fields
Discussion posts and replies are publicly visible
Check this page in the documentation.
https://docs.appian.com/suite/help/22.1/reference-records.html#referencing-a-record-type
ri!records[recordType!CJT_R_Vehicles.fields.some_field]
Thanks Stefan for your reply.
I've already checked the documentation and tested this :
a!localVariables( local!ids: ri!recordVehicles['recordType!CJT_R_Vehicles.fields.id'], local!ids )
a!recordData( recordType:'recordType!CJT_R_Vehicles', filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: 'recordType!CJT_R_Vehicles.fields.deleted', operator: "=", value: false ), }, ignoreFiltersWithEmptyValues: true ) ),
You should use a!queryRecordType() to fetch the data. It will return a datasubset with the ".data" attribute containing the list of records.
When you change this, it should work.
Thanks a lot !
I was focused on the type, and expression, so I did not see that the Test Input was incorrect.