Hi All,
I have a use case where I'm querying data from database table of 100 records set in paging Info. Now, Once I pass this data from my rule to process model, I need to extract the records one by one, perform some action on them and write to DB and then loop back again in the same process model to fetch the 2nd row data and repeat this in batches. My question is how do I fetch the data from a batch of 100 records and to get only one row and then 2nd row and so on without using an MNI? Please advise.
Discussion posts and replies are publicly visible
Dusty said: I need to extract the records one by one, perform some action on them and write to DB and then loop back again in the same process model to fetch the 2nd row data and repeat this in batches.
Instead of writing records one by one during processing, you should use a!forEach() to perform calculations on each record individually and collect all the processed results. Then, after the forEach completes, you can write all the processed records to the database in a single batch operation. This approach gives you the benefit of individual record processing while maintaining optimal database performance through batch writing, eliminating the need for MNI or complex looping patterns in your Appian process model.