Returning large data from query in small batch

Hello, looking for some help.

 

I have a requirement to query a database for a customer that has over 7,000 rows. 

When I run the query, to return 7000 rows, it fails (obviously too much)

Is there a way to query for the 7000 rows but only query and load 15 or so at a time? And when the user clicks the next arrow on the paging grid, it only loads 15-30? So that the interface isn't overloaded?

They aren't going to page through 7,000 records, 15 at a time, but the requirements still want to be able to have an overall customer view.

Thanks,

  Discussion posts and replies are publicly visible

Parents
  • create a query entity rule such as : a!queryEntity(entity: cons!entity, query: a!query(filters{whatever filters you want},
    pagingInfo:ri!!pagingInfo
    ))

    then in the main rule create local!pagingInfo(startIndex: 1, batchSize: 10)
    Then call the query entity rule;
    with(
    local!query: rule!query(pagingInfo: local!pagingInfo),
    then display it in grid
    )
    Do not do another todatasubset() on local!query.data...then your totalcount will only show 10 items in the grid instead of display 1-to of 7000 records.
    This approach ensures that you are only querying 10 items at a time from the 7000 records. Another thing to note is if you have filters on that query rule, then if you have filtering through any text boxes or dropdown, do a!save(local!pagingInfo.startIndex, 1) on the saveInto of those fields, otherwise you will get error for startindex.
Reply
  • create a query entity rule such as : a!queryEntity(entity: cons!entity, query: a!query(filters{whatever filters you want},
    pagingInfo:ri!!pagingInfo
    ))

    then in the main rule create local!pagingInfo(startIndex: 1, batchSize: 10)
    Then call the query entity rule;
    with(
    local!query: rule!query(pagingInfo: local!pagingInfo),
    then display it in grid
    )
    Do not do another todatasubset() on local!query.data...then your totalcount will only show 10 items in the grid instead of display 1-to of 7000 records.
    This approach ensures that you are only querying 10 items at a time from the 7000 records. Another thing to note is if you have filters on that query rule, then if you have filtering through any text boxes or dropdown, do a!save(local!pagingInfo.startIndex, 1) on the saveInto of those fields, otherwise you will get error for startindex.
Children
No Data