Sorting functionality

Certified Associate Developer
Hi,
I have created a paging grid with some columns.

For Ex: Employee Id , Experience and Department.

Requirement is like sorting based on Employee Id and Experience. So In department the logic is

a!gridTextColumn(
label: "Department",
field: "noSort",
data: index(
local!dataForCurrentPage,
"department",
null
)
),


I faced following error when I click on department column.

Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error: An error occurred while executing a save: Expression evaluation error in rule 'kp_ial_fetchfiltereddata' at function a!queryEntity: The field [noSort] does not exist.

Any suggestions to get this to work?

Thanks in advance

OriginalPostID-260398

  Discussion posts and replies are publicly visible

Parents
  • Hi Pavani - replace "noSort" with "department". If you are using a paging grid, you will need to provide a field for each gridTextColumn. If you absolutely do not want to sort by department, you can change it to a different field such as "employeeId" instead. With that change, you will not be able to sort by department, but instead will always defer to the employeeId sort field instead. However, users usually find this un-intuitive, and I would recommend leaving the field as "department".
Reply
  • Hi Pavani - replace "noSort" with "department". If you are using a paging grid, you will need to provide a field for each gridTextColumn. If you absolutely do not want to sort by department, you can change it to a different field such as "employeeId" instead. With that change, you will not be able to sort by department, but instead will always defer to the employeeId sort field instead. However, users usually find this un-intuitive, and I would recommend leaving the field as "department".
Children
No Data