splitlistintochunks
Reactive icon

SplitListIntoChunks

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 11 Apr
 by 
5.0
 (2 ratings)
splitlistintochunks

SplitListIntoChunks

Documentation
1.0.0

📦 Installation

  1. Download the .oml or .oap file from the OutSystems Forge.

  2. Open OutSystems Service Studio.

  3. Import the component into your application or environment.

  4. Publish the module to your environment.


⚙️ Configuration

No specific configuration is needed, but here’s what you can optionally customize:

  • Chunk Size: Set the desired number of items per chunk via an input parameter.

  • Input List: Provide a JSON array (wrapped or unwrapped) as input.

  • Output: The component will return a list of JSON strings (chunks) containing evenly divided data.


🚀 How to Use

  1. Add the Server Action SplitJsonArrayIntoChunks from the module in your logic flow.

  2. Provide the following:

    • InputJson: A JSON string (e.g., [{"Id":1,"Name":"A"},{"Id":2,"Name":"B"}])

    • ChunkSize: Integer (e.g., 3)

  3. The output will be:

    json[ "[{\"Id\":1,\"Name\":\"A\"},{\"Id\":2,\"Name\":\"B\"},{\"Id\":3,\"Name\":\"C\"}]", "[{\"Id\":4,\"Name\":\"D\"},{\"Id\":5,\"Name\":\"E\"}]" ]

💡 Use Case Example

  • Suppose you want to process large lists in batches via asynchronous processes or timers.

  • This component helps break the list into manageable sizes and stores them for parallel processing, improving performance and avoiding timeouts.


🧪 Demo Page

This Forge asset includes a fully working demo with:

  • Input box to set chunk size

  • Live result display

  • Progress indicator

  • Record summary

  • Example table with the processed data

You can customize the logic or UI as needed in your applications.