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 like
    a!queryEntity(
    entity: cons!TEST_ENTITY,
    query:
    a!query(
    filters:
    {
    Filters you want to add
    },
    pagingInfo:ri!!pagingInfo
    )
    )

    Create a new rule in which we will iterate the loop according to the total count of the datasubset

    with(
    local!batchSize: 1000,
    local!filters: a!fromJson(
    ri!input
    ),
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),
    local!iterations: roundup(
    cast(
    typeof(
    1
    ),
    local!filters.totalCount
    ) / local!batchSize,
    0
    ),
    local!dt: apply(
    rule!TestReportViewDataOnly(
    pagingInfo: _,
    filters: local!filters
    ),
    apply(
    topagingInfo(
    _,
    local!batchSize
    ),
    1 + enumerate(
    local!iterations
    ) * local!batchSize
    )
    ),
    .
    .
    .
    .
    )

    I hope this will help you
Reply
  • Create a query entity rule like
    a!queryEntity(
    entity: cons!TEST_ENTITY,
    query:
    a!query(
    filters:
    {
    Filters you want to add
    },
    pagingInfo:ri!!pagingInfo
    )
    )

    Create a new rule in which we will iterate the loop according to the total count of the datasubset

    with(
    local!batchSize: 1000,
    local!filters: a!fromJson(
    ri!input
    ),
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),
    local!iterations: roundup(
    cast(
    typeof(
    1
    ),
    local!filters.totalCount
    ) / local!batchSize,
    0
    ),
    local!dt: apply(
    rule!TestReportViewDataOnly(
    pagingInfo: _,
    filters: local!filters
    ),
    apply(
    topagingInfo(
    _,
    local!batchSize
    ),
    1 + enumerate(
    local!iterations
    ) * local!batchSize
    )
    ),
    .
    .
    .
    .
    )

    I hope this will help you
Children