QueryDef returns only 10,000 records in Adobe Campaign workflows

When running workflows in Adobe Campaign Classic, if you don’t specify the lineCount attribute, queryDef inside a JavaScript activity returns only 10,000 records. Record counts appear stuck at 10,000 even when more records exist. To resolve the issue, set the lineCount attribute to a higher value in the queryDef configuration.

Description description

Environment

Adobe Campaign Classic, v7.4.2

Issue/Symptoms

  • A workflow using the queryDef inside a JavaScript activity returns exactly 10,000 records.
  • The record count does not increase beyond 10,000, even when more records exist.
  • This behavior occurs when a FOR loop processes results from a queryDef operation without specifying the lineCount attribute.

Resolution resolution

Follow these steps to resolve the issue:

  1. In Adobe Campaign Classic, go to Campaigns > Workflows, and open the workflow that contains the queryDef operation.

  2. Locate the JavaScript activity in the workflow that uses the queryDef API to select records.

  3. Add or update the lineCount attribute in queryDef to a higher value. For example:

    code language-none
    var query = xtk.queryDef.create(    <queryDef schema="nms:recipient" lineCount="80000">    <select>    <node expr="@id"/>    </select>    </queryDef>    );
    
  4. Save and execute the workflow.

  5. Verify that the returned record count exceeds 10,000 and meets expectations.

  6. Adjust lineCount as needed for performance and optimal results.

Notes:

  • If lineCount is not specified, the query returns up to 10,000 records by default.
  • Setting lineCount="0" returns no records; it does not mean unlimited results.
  • Increasing lineCount retrieves more records but may reduce system performance if set too high.
  • Only the first N records (where N equals lineCount) are returned, even if more match the criteria.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f