Sorting Grid Field with list of maps

Certified Senior Developer

Hi,

I have list of maps in a local variable . I am using it in grid field . I need to apply sort to the columns. Sorting is supported only when the data is from query entity or record. Is there any workaround where we can manually apply sort to the grid when the data is a list of map. Sample code.

a!localVariables(
  local!data: {
    a!map(id: 1, uin: 234, count: 5, ),
    a!map(id: 2, uin: 232, count: 5, ),
    a!map(id: 3, uin: 28, count: 5, )
  },
  a!gridField(
    data: local!data,
    columns: {
      a!gridColumn(label: "ID", value: fv!row.id),
      a!gridColumn(label: "UIN", value: fv!row.uin),
      a!gridColumn(label: "COUNT", value: fv!row.count)
    }
  )
)

Can you please help me with the sorting 

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data