<?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>I&amp;#39;m trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/discussions/f/general/2759/i-m-trying-to-take-a-text-string-and-divide-it-into-a-text-array-of-8-charac</link><description>I&amp;#39;m trying to take a text string and divide it into a text array of 8 characters. Any suggestions? I know you can use apply to run through an array but I can&amp;#39;t figure out how to loop through a sting.... OriginalPostID-111174 OriginalPostID-111174</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/130329?ContentTypeID=1</link><pubDate>Thu, 29 Feb 2024 18:13:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c25c0c48-5597-4455-9aff-07136d71f0a5</guid><dc:creator>Gurusai</dc:creator><description>&lt;p&gt;charat(ri!string, enumerate(len(ri!string)) + 1)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/100245?ContentTypeID=1</link><pubDate>Sat, 27 Aug 2022 06:13:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75102660-6e86-4710-a274-ea3593fa1e96</guid><dc:creator>shukurs0001</dc:creator><description>&lt;p&gt;char(code(&amp;quot;Text String&amp;quot;))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/84196?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 14:53:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fabccce0-91b2-4091-87b8-be1f9b7546dc</guid><dc:creator>ankuraggarwal</dc:creator><description>&lt;p&gt;Though its an old post, just too add value to new readers In case if some one looking for answer with function &amp;quot;a!forEach&amp;quot;..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The answer is inspired from older replies. Thank you ..&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(  
    items: enumerate(len(ri!inp)),  
    expression: charat(ri!inp, fv!index)
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9665?ContentTypeID=1</link><pubDate>Sat, 31 May 2014 09:32:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:79a1c0bc-c1b1-43bb-93f0-9f70a8d67b0c</guid><dc:creator>danielh754</dc:creator><description>works like a charm! thank you so much!!!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9626?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 17:06:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce511ce7-0173-4fd7-b50b-18185cd7534a</guid><dc:creator>Steven Miccile</dc:creator><description>Great rule! Just a simple modification to make it dynamic based on the length of the input:&lt;br /&gt;&lt;br /&gt;=apply(fn!mid, repeat(1, &amp;quot;qwertyuiopasdfghjklzxcvb&amp;quot;), (enumerate(tointeger(roundup(len(&amp;quot;qwertyuiopasdfghjklzxcvb&amp;quot;)/8,0)))*8)+1, 8)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9621?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 14:31:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ecc50f9-144e-4f9c-a8e7-58a37c1d6c71</guid><dc:creator>normanc</dc:creator><description>Just re-read the question. To get groups of 8 characters use...&lt;br /&gt;&lt;br /&gt;=apply(fn!mid, repeat(1, &amp;quot;qwertyuiopasdfghjklzxcvb&amp;quot;), (enumerate(8)*8)+1, 8)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9620?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 14:26:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdf177cc-667e-4efb-9841-5cc4d1add26a</guid><dc:creator>normanc</dc:creator><description>This seems to work, not sure why...&lt;br /&gt;&lt;br /&gt;=apply(fn!mid, repeat(1, &amp;quot;qwertyui&amp;quot;), enumerate(8) + 1, 1)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9612?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 04:12:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b20a622-afa4-4776-90f6-5fc6b2614008</guid><dc:creator>Steven Miccile</dc:creator><description>There is probably a MUCH simpler solution than this, but it should work:&lt;br /&gt;&lt;br /&gt;=with(local!input:&amp;quot;divide11divide22divide&amp;quot;,local!length:len(local!input),local!times:tointeger(roundup(local!length/8,0)),local!array1:repeat(local!times,local!input),local!begins:enumerate(local!times)*8,local!mod:mod(local!length,8),local!right:local!begins+local!mod,array2:apply(fn!right,merge(local!array1,reverse(local!right))),local!array3:apply(fn!left,local!array2,8),local!array3)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9611?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 02:28:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:822741b6-87a8-45a6-9be6-e8a28071c8ba</guid><dc:creator>danielh754</dc:creator><description>yes close, but instead of just one character as each item in the array eight characters in sequence.  So maybe a way instead to merge 8 items together and then another 8 items&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I'm trying to take a text string and divide it into a text array of 8 charac</title><link>https://community.appian.com/thread/9610?ContentTypeID=1</link><pubDate>Wed, 28 May 2014 00:54:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2edf46c9-f219-47e1-b52b-ff1b6f165233</guid><dc:creator>Steven Miccile</dc:creator><description>Are you trying to do something like this?  apply(fn!index(&amp;quot;string&amp;quot;,_,&amp;quot;&amp;quot;),enumerate(len(&amp;quot;string&amp;quot;))+1)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>