Question on SAIL form duplicating records on different pages

Sail Grid Issue.

Hi All,

On the sail form, when I am fetching 25 records at page 1, If I have more than those records, we go on for 2nd page but mu code is loading the same first 25 records. Can any one look into the code pasted below & guide me over the issue?

if(
isnull(local!selectedFileId),
{},
with(


local!linkForDownloadDocs:
getdatasubsetdownloadlinkfromrule(
rule!PDIM_datasubset_searchDocsForFileByPAID,
a!toJson({
paID: local!selectedFileId

})
),


local!selectedFiles:
rule!PDIM_searchDocsForFileByPAID(local!selectedFileId),

if(local!selectedFiles.totalCount<1,

a!textField(
label:"Currently there are no documents part of this file",
readOnly:true

),

{
...

OriginalPostID-200880

OriginalPostID-200880

  Discussion posts and replies are publicly visible

Parents
  • As a side note, we noticed in our code that some of our grids could have a weird behavior when you attempt to go to page 2+. Say you have a bunch of user search/filtering fields and a grid showing the results. The user can sort the grid as they see fit, and when they change the search criteria the sorting typically stayed in place, though the results may or may not have sorted as anticipated. However, if the user advanced the paging of the grid to say, page 3 (record 51-75 of say, 200), when they changed the search criteria in the form, we were not resetting the paging information to the original page 1 & sorting default. This meant when the search was performed, if the result set only contained 15 items, the grid attempted to show page 3... when there would only be 1 page of 25 items. i.e. the grid was now blank.

    Our solution was to add in the pageing information (starting value 1 and our default sort order) to each of the form fields they could change. Each time they changed search criteria and the search was performed we reset the grid back to page 1.
Reply
  • As a side note, we noticed in our code that some of our grids could have a weird behavior when you attempt to go to page 2+. Say you have a bunch of user search/filtering fields and a grid showing the results. The user can sort the grid as they see fit, and when they change the search criteria the sorting typically stayed in place, though the results may or may not have sorted as anticipated. However, if the user advanced the paging of the grid to say, page 3 (record 51-75 of say, 200), when they changed the search criteria in the form, we were not resetting the paging information to the original page 1 & sorting default. This meant when the search was performed, if the result set only contained 15 items, the grid attempted to show page 3... when there would only be 1 page of 25 items. i.e. the grid was now blank.

    Our solution was to add in the pageing information (starting value 1 and our default sort order) to each of the form fields they could change. Each time they changed search criteria and the search was performed we reset the grid back to page 1.
Children
No Data