Fail to sort data

Hi All,

We're facing while using Sail Grid. Please find problem explained below.Any help is much appreciated.

We're fetching the data using query record and that data is displayed in a Grid component.

Now when we try to sort the grid data by clicking on a column header then it fails to sort the data for that column and it remains sorted on the default sort info that we provided at the time of fetching data from query record.


For your reference please find sample code below. Many Thanks in advance.


=load(
local!pagingInfo: topaginginfo(1, 10),
with(
local!data: =queryrecord(
recordType: cons!COMPANY_AUDIT_LOG,
query: 'type!{www.appian.com/.../2009}Query'(
'selection|aggregation': 'type!{www.appian.com/.../2009}Aggregation'(
columns: {
'type!{www.appian.com/.../2009}AggregationColumn'(
field: "full_name",
alias: "label",
visible: true,
...

OriginalPostID-91648

OriginalPostID-91648

  Discussion posts and replies are publicly visible

Parents
  • Also make a small change at the place you are defining the grid i.e. you are defining the local!pagingInfo again inside the with() again which is not necessary here, because you have already defined it. Also there is no need to include load() and with() once again inside the section layout. You can directly configure the grid here. As you are using the value: and saveInto: mechanisms, your local!pagingInfo will be saved with the new values and the expressions inside the with() will be evaluated with these new values. One more suggestion is to make use of Appian common objects which makes your code look clean and easier to debug.
Reply
  • Also make a small change at the place you are defining the grid i.e. you are defining the local!pagingInfo again inside the with() again which is not necessary here, because you have already defined it. Also there is no need to include load() and with() once again inside the section layout. You can directly configure the grid here. As you are using the value: and saveInto: mechanisms, your local!pagingInfo will be saved with the new values and the expressions inside the with() will be evaluated with these new values. One more suggestion is to make use of Appian common objects which makes your code look clean and easier to debug.
Children
No Data