Record Type Paging Grid: Pre-Populating Selection

Certified Lead Developer

I am creating a paging grid with selection that is based on a recordType! in my environment.

My interface is set up to follow the paradigm in https://docs.appian.com/suite/help/22.1/grid-with-selection-pattern.html#[line-1-54]-define-local-variables-and-grid-data but with the "data" parameter in the gridField obtained via recordType.

Code below:

a!localVariables(
local!selection:index(ri!selectedStuff,"id",{}),
local!selectedRows, /*this is what i need to populate*/
..
a!gridField(
data:recordType!Foo,
selectable:true,
selectionValue:local!selection,
selectionSaveInto:{
    local!selection,
    a!save(local!selectedRows,append(local!selectedRows,fv!selectedRows)),
    a!save(local!selectedRows,difference(local!selectedRows,fv!deselectedRows)),
    a!save(ri!selectedStuff,local!selectedRows)
    }
)
)

In my use case, I want to be able to pre-populate my local!selectedRows so that the grid can be pre-selected coming into the screen.

This is an entity-backed record, and passing a CDT array (of that entity) makes the page error on additional selection (why...it is an entity backed record and I am using the same entity)

I have also tried calling a queryrecordtype() to set local!selectedRows, but this also does not let me select/deselect.

How can I pre-populate the local!selectedRows with the record data I want to be selected?

  Discussion posts and replies are publicly visible