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
  • Hi johnh0001,

    Use pagingInfo in load(), query the data and use gird field in with(). but make sure querying the data should be data subset not list of variant.Follow the code snippet, it might help you.

    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10
    ),
    with(
    local!workflow:queryEntity(
    pagingInfo: local!pagingInfo
    ),
    a!gridField(
    label: "sample",
    columns: {
    a!gridTextColumn(
    label: "Workflow Number",
    data: index(
    local!workflow.data,
    "wfNumber",
    {}
    )
    ),
    a!gridTextColumn(
    label: "Request ID",
    data: index(
    local!workflow.data,
    "requestId",
    {}
    )
    ),
    a!gridTextColumn(
    label: "Absence Name",
    data: index(
    local!workflow.data,
    "absenceName",
    {}
    )
    )
    },
    value: local!pagingInfo,
    saveInto: local!pagingInfo,
    totalCount: local!workflow.totalCount
    )
    )
    )
Reply
  • Hi johnh0001,

    Use pagingInfo in load(), query the data and use gird field in with(). but make sure querying the data should be data subset not list of variant.Follow the code snippet, it might help you.

    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10
    ),
    with(
    local!workflow:queryEntity(
    pagingInfo: local!pagingInfo
    ),
    a!gridField(
    label: "sample",
    columns: {
    a!gridTextColumn(
    label: "Workflow Number",
    data: index(
    local!workflow.data,
    "wfNumber",
    {}
    )
    ),
    a!gridTextColumn(
    label: "Request ID",
    data: index(
    local!workflow.data,
    "requestId",
    {}
    )
    ),
    a!gridTextColumn(
    label: "Absence Name",
    data: index(
    local!workflow.data,
    "absenceName",
    {}
    )
    )
    },
    value: local!pagingInfo,
    saveInto: local!pagingInfo,
    totalCount: local!workflow.totalCount
    )
    )
    )
Children
No Data