<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/discussions/f/process/39391/how-to-fetch-data-in-sequence-and-run-the-process-in-a-batch</link><description>Hi All, 
 I have a use case where I&amp;#39;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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149636?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 23:27:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:49639e5c-04d9-4338-96ea-b3ae2419e65f</guid><dc:creator>Dusty</dc:creator><description>&lt;p&gt;Thank you so much &lt;a href="/members/orlandos8991"&gt;osanchea&lt;/a&gt;&amp;nbsp; really appreciate it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149635?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 23:07:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad3cefd6-f0b8-44ea-95d8-2977eef2f311</guid><dc:creator>osanchea</dc:creator><description>&lt;p&gt;In that case, you can follow these steps:&lt;br /&gt;1. create a process variable &amp;quot;counter&amp;quot;&amp;nbsp; and set value 1(default)&lt;br /&gt;2. To reference&amp;nbsp;each iteration use this expressi&amp;oacute;n: index(pv!data, pv!counter, null)&lt;br /&gt;3. Configure XOR node --&amp;gt; pv!counter&amp;lt;100, if yes, go to &amp;quot;counter node +1&amp;quot;, if no go to &amp;quot;end node&amp;quot;&lt;br /&gt;4. Increment counter +1 and save value in pv!counter---&amp;gt; pv!counter + 1&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/14/pastedimage1751670432500v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149634?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 22:42:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae694aef-fcbe-428d-987a-67016ff73663</guid><dc:creator>Dusty</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/orlandos8991"&gt;osanchea&lt;/a&gt;&amp;nbsp; In the expression part of a!forEach I don&amp;#39;t want to perform any update, instead just fetch the first row of data and then in the next flow I will perform some actions. How do I fetch the first row of data? and then after lopping this same rule should fetch second row of data, third row of data....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149633?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 22:35:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b52d0742-61b4-4bc2-9685-a47dc1a4009a</guid><dc:creator>osanchea</dc:creator><description>&lt;p&gt;HI. Try this inside a script task, and save the result in a map variable of type &amp;#39;multiple&amp;#39;.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
  items: pv!data.data,
  /*adjust the logic based on your requirement*/
  expression: a!update(
    data: fv!item,
    index: &amp;quot;caseStatus&amp;quot;,
    value: &amp;quot;ACTIVE&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149632?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 20:58:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a02aaf38-cb23-4d39-b8c7-dd1e2849c17e</guid><dc:creator>Dusty</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp;&lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp; Could you please advise how to write this using a!foreach() function?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I have my expression rule as below and I&amp;#39;m trying to get 100 records in 1 batch to pass to the process model. Now I need to fetch the 1st row from this rule output into a process model - perform some action and then loop back to fetch the second row - perform some action, loop back third record to fetch 3rd row and so on until I reach my 100th record.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Rule:&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;a!localVariables(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;local!getData: a!queryEntity_22r2(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;entity: cons!SAC_ENTITY_CLIENTCASES,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;fetchTotalCount: true,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;query: a!query(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;logicalExpression: a!queryLogicalExpression(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;operator: &amp;quot;AND&amp;quot;,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;filters: {&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!queryFilter(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;field: &amp;quot;docsSent&amp;quot;,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;operator: &amp;quot;is null&amp;quot;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;selection: a!querySelection(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;columns: {&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!queryColumn(field: &amp;quot;caseId&amp;quot;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!queryColumn(field: &amp;quot;caseStatus&amp;quot;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!queryColumn(field: &amp;quot;clientName&amp;quot;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!queryColumn(field: &amp;quot;folderId&amp;quot;)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;pagingInfo: if(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;rule!APN_isBlank(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;ri!pagingInfo&lt;/em&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a!pagingInfo(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;startIndex: 1,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;batchSize: 5,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;sort: a!sortInfo(&lt;/em&gt;&lt;br /&gt;&lt;em&gt;field: &amp;quot;caseId&amp;quot;,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;ascending: true&lt;/em&gt;&lt;br /&gt;&lt;em&gt;)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;ri!pagingInfo&lt;/em&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;)&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;),&lt;/em&gt;&lt;br /&gt;&lt;em&gt;local!getData&lt;/em&gt;&lt;br /&gt;&lt;em&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Output of the Rule saved into PV of type data subset in process model.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;startIndex&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;1&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;batchSize&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;10&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;sort&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;List of SortInfo - 1 item&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;SortInfo&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;field&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;caseId&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;ascending&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;true&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Boolean)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;totalCount&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;5&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;data&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;List of Dictionary - 5 items&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;Dictionary&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;322&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseStatus&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;On-Hold/Request for Info&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;clientName&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;user1520872&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;folderId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;214625&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;Dictionary&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;21326&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseStatus&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;On-Hold/Request for Info&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;clientName&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;user1520872&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;folderId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;154459&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;Dictionary&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;21327&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseStatus&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;Ready For Underwriting&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;clientName&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;user1520872&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;folderId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;154458&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;Dictionary&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;52046&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseStatus&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;Ready For Underwriting&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;clientName&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;user1520872&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;folderId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;154458&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;Dictionary&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;59106&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;caseStatus&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;On-Hold/Request for Info&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;clientName&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;user1520872&amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;folderId&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;154459&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;
&lt;div class="SelectableTreeNode---inline SelectableTreeNode---openCloseLink"&gt;&lt;/div&gt;
&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_key"&gt;identifiers&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;List of Number (Integer) - 5 items&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;322&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;21326&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;21327&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;52046&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;59106&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Number (Integer))&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149554?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 05:36:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b3b6f5e-2652-49be-8e44-3ec6b991412b</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Better way to achieve the same is querying the 100 records, do manipulation on them in an expression rule using a!foreach() and then pass the output of the rule in the write records node.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149553?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 05:23:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:013ebb4f-2645-49de-9748-9ed109eef3e3</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="85941" url="~/discussions/f/process/39391/how-to-fetch-data-in-sequence-and-run-the-process-in-a-batch"] 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.[/quote]
&lt;p&gt;&lt;span data-teams="true"&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fetch data in sequence and run the process in a batch</title><link>https://community.appian.com/thread/149551?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 04:05:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1d28e358-361b-4c3c-993b-870d51755734</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Did you consider looping inside the process model?&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/25.2/looping.html"&gt;docs.appian.com/.../looping.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>