<?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 can I achieve &amp;quot;Manipulation of data during looping&amp;quot;</title><link>https://community.appian.com/discussions/f/data/37560/how-to-can-i-achieve-manipulation-of-data-during-looping</link><description>Hello, 
 a!localVariables( local!number: todecimal(370737340900000.00), /* Replace this with your input number */ local!chunkSize: 7, /* Define chunk size (7 digits) */ local!divisor: 10 ^ local!chunkSize, 
 local!chunks: {}, /* List to store chunks </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to can I achieve "Manipulation of data during looping"</title><link>https://community.appian.com/thread/140805?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 06:08:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5eb9bf8b-9f9b-45ce-876f-3a4f09f7006e</guid><dc:creator>Kumar Agniwesh</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;, Much easier&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to can I achieve "Manipulation of data during looping"</title><link>https://community.appian.com/thread/140804?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 06:03:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e8f59325-00a8-4c2d-a0b0-57b316e62c5e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!value: 370737340900000.00,
  local!chunkSize: 3,
  local!textValue: text(local!value, &amp;quot;0&amp;quot;),
  a!forEach(
    items: enumerate(ceiling(len(local!textValue) / local!chunkSize)),
    expression: mid(local!textValue, (fv!item * local!chunkSize) + 1, local!chunkSize)
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to can I achieve "Manipulation of data during looping"</title><link>https://community.appian.com/thread/140803?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 05:52:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a9cacbc3-1dfc-457c-b0b3-7c258fbe63e4</guid><dc:creator>Kumar Agniwesh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!text: char(
    code(
      &amp;quot;21121212u1i2ui12i1iwjansjnajnsjansnansa&amp;quot;
    )
  ),
  local!length: 7,
  
  local!arrayWithIdentifier: a!flatten(
    a!forEach(
      items: local!text,
      expression: {
        if(
          mod(fv!index, local!length) = 0,
          { fv!item, &amp;quot;;&amp;quot; },
          { fv!item }
        )
      }
    )
  ),
  local!splitData: split(concat(local!arrayWithIdentifier), &amp;quot;;&amp;quot;),
  local!splitData
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to can I achieve "Manipulation of data during looping"</title><link>https://community.appian.com/thread/140799?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 05:31:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec2b45ba-90a3-4358-bbe1-7b213ab8efe5</guid><dc:creator>Soma</dc:creator><description>&lt;p&gt;There can be other ways of achieving this too.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/pastedimage1726723866097v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!number: &amp;quot;37073734098765431&amp;quot;, /* Replace this with your input number */
  local!chunkSize: 7, /* Define chunk size (7 digits) */
  local!chunks: {}, /* List to store chunks */
  local!x:reverse(code(local!number)),

  /* Reverse the chunks list to maintain the correct order */
  a!forEach(
    items: enumerate(ceiling(length(local!x)/local!chunkSize))+1,
    expression: tointeger(joinarray(
      reverse(char(reject(
      a!isNullOrEmpty,
      index(
        local!x,
        enumerate((local!chunkSize))+if(fv!isFirst,1,(local!chunkSize*(fv!item-1))+1),
        null
      )
    )))
    ))
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>