{"id":5401,"date":"2017-11-09T20:41:07","date_gmt":"2017-11-09T20:41:07","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=5401"},"modified":"2020-04-15T09:36:26","modified_gmt":"2020-04-15T16:36:26","slug":"current-repeat-index","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/current-repeat-index\/","title":{"rendered":"Current Repeat Index"},"content":{"rendered":"<p>When an array variable in a procedure is going through its list, the user may want the pointer into the list (the index) that the array variable is currently using to be repeated. To do this, use the Current Repeat Index system variable:<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5402\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex.png\" alt=\"\" width=\"470\" height=\"419\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex.png 470w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex-300x267.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex-150x134.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex-250x223.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex-202x180.png 202w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex-337x300.png 337w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/a><\/p>\n<h2>Example<\/h2>\n<p>The following example shows how to pull separate items from a group (a list) by the index. To follow along, download the files here:<\/p>\n<p><a href=\"\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex.zip\">https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CurrentRepeatIndex.zip<\/a><\/p>\n<p>To implement:<\/p>\n<p>1. Right click &#8216;lines&#8217; and select Add Variable.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5404\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1.png\" alt=\"\" width=\"390\" height=\"224\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1.png 390w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1-300x172.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1-150x86.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1-250x144.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-1-313x180.png 313w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/a><\/p>\n<p>2. The Variable dialog box displays. Select OK to continue.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5405\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2.png\" alt=\"\" width=\"492\" height=\"351\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2.png 492w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-300x214.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-150x107.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-250x178.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-252x180.png 252w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-421x300.png 421w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-210x150.png 210w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-2-400x285.png 400w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/a><\/p>\n<p>3. In the Project Window, right click the form and select Add Variable &gt; By position. Enter &#8216;line1&#8217; in the Name field and select OK.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5406\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3.png\" alt=\"\" width=\"434\" height=\"298\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3.png 434w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3-300x206.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3-150x103.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3-250x172.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-3-262x180.png 262w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/a><\/p>\n<p>4. Right click the &#8216;line1&#8217; variable from the Project Window and select Add Pre-condition Procedure &gt; Set Variable. Enter &#8216;GetByIndex1&#8217; in the Name field. From the Use variable field, select the &#8216;lines&#8217; variable created earlier. Select OK.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5407\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4.png\" alt=\"\" width=\"364\" height=\"208\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4.png 364w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4-300x171.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4-150x86.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4-250x143.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-4-315x180.png 315w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/><\/a><\/p>\n<p>5. The Set Variable Action dialog box displays. Select &#8216;line1&#8217; from the Variable drop-down menu. Select OK.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5408\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5.png\" alt=\"\" width=\"336\" height=\"125\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5.png 336w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5-300x112.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5-150x56.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-5-250x93.png 250w\" sizes=\"(max-width: 336px) 100vw, 336px\" \/><\/a><\/p>\n<p>6. Right click the\u00a0&#8216;GetByIndex1&#8217; procedure and select Add AND Condition &gt; Is equal to. The Data Condition dialog box displays. From the Of variable drop-down menu, select the Current Repeat Index system variable. In the field below &#8216;Is equal to&#8217;, enter a constant value of 1. Check the Compare as Numeric checkbox. Select OK to continue.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5409\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6.png\" alt=\"\" width=\"399\" height=\"266\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6.png 399w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6-300x200.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6-150x100.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6-250x167.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-6-270x180.png 270w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/a><\/p>\n<p>7. Repeat steps 3-6 as needed, adjusting the naming conventions as needed. The results can be viewed in the Variables Window.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5410\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7.png\" alt=\"\" width=\"284\" height=\"217\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7.png 284w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7-150x115.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7-250x191.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/RepeatIndex-7-236x180.png 236w\" sizes=\"(max-width: 284px) 100vw, 284px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When an array variable in a procedure is going through its list, the user may want the pointer into the list (the index) that the array variable is currently using to be repeated. To do this, use the Current Repeat Index system variable: Example The following example shows how to pull separate items from a [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[262,255,263],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5401"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=5401"}],"version-history":[{"count":3,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5401\/revisions"}],"predecessor-version":[{"id":7878,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5401\/revisions\/7878"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=5401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=5401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=5401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}