Document Sorting for documents retrieving from Knowledge Center

A Score Level 1

Hi,

Is there any way to sort the documents which are retrieved from knowledge center.

Below is my code:

a!gridField(
label: "Documents Uploaded",
labelPosition: "ADJACENT",
totalCount: count(
CDT.fileUpload
),
columns: {
a!gridTextColumn(
label: "Document Name",
data: {
a!forEach(
items: CDT.fileUpload,
expression: document(
fv!item,
"name"
)
)
},
links: a!forEach(
items: CDT.fileUpload,
expression: a!documentDownloadLink(
document: {
fv!item
}
)
),
alignment: "LEFT"
),
a!gridTextColumn(
label: "Date & Time",
data: {
a!forEach(
items: CDT.fileUpload,
expression: text(
document(
fv!item,
"dateCreated"
),
"dd mmm yyyy AM/PM"
)
)
}
)
},
value: a!pagingInfo(
startIndex: 1,
batchSize: count(
CDT.fileUpload
)
),
saveInto: {},
validations: {},
shadeAlternateRows: true
)

I have attached screenshot for the same. Now I want to sort documents on any of the columns.

 

 

  Discussion posts and replies are publicly visible