<?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>Logic to print the numbers between two numbers</title><link>https://community.appian.com/discussions/f/rules/20861/logic-to-print-the-numbers-between-two-numbers</link><description>Hi, 
 How can I print the numbers between two numbers. 
 
 Eg: Number 1 = 1, Number 2 = 5. 
 Expected output 2,3,4 
 
 Kindly help. Thanks in Advance</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/102041?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 04:43:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8d88fa6d-f36e-4161-9bc5-c9c0a727e8ee</guid><dc:creator>sindhuanjalit4252</dc:creator><description>&lt;p&gt;It&amp;#39;s helpful&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/100894?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 19:53:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba06f634-22f9-4835-9732-a00a1a5becd9</guid><dc:creator>juergeng0002</dc:creator><description>&lt;p&gt;Yes - the conversation is ~ a year old, but here is another version:&lt;br /&gt;ldrop(enumerate(ri!number2),1+ri!number1),&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/100891?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 19:22:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:54dcf28d-a5fc-4c4d-bca6-5f352aed83b5</guid><dc:creator>shukurs0001</dc:creator><description>&lt;h4&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!no1: 5,
  local!no2: 10,
  joinarray(a!forEach(
    items: enumerate(local!no2-local!no1-1),
    expression: local!no1+fv!index
  ),&amp;quot; &amp;quot;)
)&lt;/pre&gt;&lt;/h4&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/89910?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 12:35:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf764a32-d559-4172-831e-0ab2aaa1aed8</guid><dc:creator>Venkataswethapokuri</dc:creator><description>&lt;p&gt;ri!number1 + enumerate((ri!number2-ri!number1)-1)+1,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/86872?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 15:23:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bd3443eb-31de-4279-b2f8-167f39657b4d</guid><dc:creator>sandeepguggilla</dc:creator><description>&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;p&gt;That&amp;#39;s helpful stefan&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81253?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:53:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0e4edf16-9030-4d2a-bd7f-1ba40b2f7727</guid><dc:creator>Bharath Maruthamuthu</dc:creator><description>&lt;p&gt;OK. thanks. this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81252?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:52:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7daa3e9f-ed89-4930-b038-a76436c7a67f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Hm ... I&amp;#39;ll explain how this works. Then you will be able to adjust things as needed.&lt;/p&gt;
&lt;p&gt;enumerate() creates a list of number starting with zero going to n-1. Now you can use Appian internal magic by adding a base offset to this list, meaning the base will be added to each item in the list created by enumerate().&lt;/p&gt;
&lt;p&gt;In your case, you will need to modify the offset. Does that help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81251?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:48:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d76d92aa-36ac-422a-b6cd-5c2577090559</guid><dc:creator>Bharath Maruthamuthu</dc:creator><description>&lt;p&gt;Hi Stephan,&lt;/p&gt;
&lt;p&gt;yes. i have tried&amp;nbsp;as below. When i give number1 as &amp;quot;1&amp;quot; and number2 as &amp;quot;5&amp;quot;, I am getting below output.&lt;/p&gt;
&lt;p&gt;Here we should not print 1 here and only print 2 3 4. Can you please help here.&lt;/p&gt;
&lt;p&gt;Exp Rule: ri!number1 + enumerate(ri!number2-ri!number1)&lt;/p&gt;
&lt;p&gt;Output:&lt;/p&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;p&gt;4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81250?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:40:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a31ee7a6-4c68-466e-a533-df18884905f9</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. Then why not just replace the &amp;quot;2&amp;quot; and the &amp;quot;5&amp;quot; by some integer rule inputs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81249?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:39:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0783621-5075-42ea-9adc-1d93852f735e</guid><dc:creator>Bharath Maruthamuthu</dc:creator><description>&lt;p&gt;Thank you Stefan. But here we are planning to declare the two numbers (inputs) as rule input and trying to display the numbers between them. Can you please help any other way you could think.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logic to print the numbers between two numbers</title><link>https://community.appian.com/thread/81247?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:33:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4914963a-e13c-4463-aff9-e479b413a559</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;2 + enumerate(5 - 2)&lt;/p&gt;
&lt;p&gt;Not tested but will need to modify the numbers anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>