Skip to main content
kondia0001
December 13, 2024
Question

Issue in read only grid selection

  • December 13, 2024
  • 2 replies
  • 0 views

Hi,
I've two interfaces, On selecting one row (Read only grid) then dependent interface(Read only grid) is displaying data based on the selection of rows.
The issue is when I'm selecting the grid rows one by one the total count is 27.

but when I select all rows quickly then the dependent interface count is reduced to 16.


here is the code snippet of dependent interface.


a!gridField(
  data: local!calculatedMetricList,
  initialSorts: {
    a!sortInfo(field: "adherence", ascending: true)
  },
  secondarySorts: {
    a!sortInfo(
      field: "employeeFullName",
      ascending: true
    )
  },
  pageSize: 20,
  borderStyle: "LIGHT",
  spacing: "DENSE",
  selectable: true,
  disableRowSelectionWhen: false,
  selectionValue: ri!selection,
  selectionStyle: "ROW_HIGHLIGHT",
  selectionSaveInto: {
    ri!selection,
    a!save(ri!selectedSupervisorRow, save!value),
    a!save(
      ri!selectedSupervisorHierarchy,
      if(
        length(fv!selectedRows) > 0,
        append(
          ri!selectedSupervisorHierarchy,
          cast(
            typeof(
              'type!{urn:com:appian:types:INO}INO_employeeHierarchyHelper'()
            ),
            fv!selectedRows[length(fv!selectedRows)].hierarchy
          )
        ),
        difference(
          ri!selectedSupervisorHierarchy,
          cast(
            typeof(
              'type!{urn:com:appian:types:INO}INO_employeeHierarchyHelper'()
            ),
            fv!deselectedRows[length(fv!deselectedRows)].hierarchy
          )
        )
      )
    ),
    a!save(ri!agentSelection, null),
    a!save(ri!selectedAgent, null)
  },
  columns: {}
)

2 replies

gayatria0439
December 13, 2024

Hi [mention:38f2d2c48fad4dc793805739a613936f:e9ed411860ed4f2ba0265705b8793d05] ,If possible Can you share the 1st interface code also 

kondia0001
December 13, 2024

Hi Gayatri,

we are passing the data from local variable

local!supervisorHierarchyList: rule!INO_hierarchyHelperListFromMapList(
    mapList: local!mapList,
    supervisorList: local!supervisorList,
    staffList: local!staffList
  ),
  local!selectedSupervisorHierarchy: a!refreshVariable(
    value: null,
    refreshOnVarChange: { ri!employee, local!selectedDateRange }
  ),