<?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>Auto numbering</title><link>https://community.appian.com/discussions/f/user-interface/21343/auto-numbering</link><description>I have an interface where a supervisor can prioritize orders. Is there a way that when one order ships that the numbers will automatically change to a lower number?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83279?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 18:48:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b38362e9-dc2b-4635-bd17-fd87465df55c</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Yea, sounds like this would be &lt;em&gt;best&lt;/em&gt; done on the function that actually ships the order, where each lower priority order is &amp;quot;raised&amp;quot; by 1&amp;nbsp;(number lowered) once an order is shipped - one order at a time.&amp;nbsp; Is there any SAIL code that can be shared around that? (I&amp;#39;m still not sure where that occurs in this use case...)&lt;/p&gt;
&lt;p&gt;The logic for having a button on the form for users to manually click to re-prioritize can be done, but the logic is a little interesting with multiple similarly-prioritized rows and multiple possible gaps (2-3 orders ship before re-prioritizing) - and would not be my preferred solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83278?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 17:40:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95378f0c-f265-4ec7-86e5-9bf4aae67c43</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;In general, you would just need functionality that loops over the list of items (using a!forEach()), and for any item where the priority number is greater than X (where X is the priority number of the item that &amp;quot;shipped&amp;quot;), lower it by one.&amp;nbsp; This doesn&amp;#39;t handle the use case of duplicate priority numbers very well, though, which is why I asked initially about duplicates.&amp;nbsp; It should handle gaps fine, it would just maintain the current gaps at their current distance (i.e. a jump from &amp;quot;5&amp;quot; to &amp;quot;9&amp;quot; would become a jump from &amp;quot;4&amp;quot; to &amp;quot;8&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83277?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 17:26:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09537d00-1310-4972-9874-a9de57f8f9b9</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;That is what I am attempting to perform, something where either they hit a button or in the background that looks for &amp;quot;missing numbers: for example in the picture &amp;quot;5&amp;quot; and will take &amp;quot;6&amp;quot; and make it &amp;quot;5&amp;quot; and so on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83276?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 17:05:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:971a0172-8c94-41de-8a92-1d98e7b1289f</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;But I&amp;#39;m thinking of your use case where the priority list is adjusted by &amp;quot;orders getting shipped&amp;quot;.&amp;nbsp; I understand that users can enter new numbers manually on the form, but that doesn&amp;#39;t tell me what happens to call the &amp;quot;automatically adjust priorities&amp;quot; use case into play.&amp;nbsp; Is it some other on-form user action?&amp;nbsp; Or something that happens in the background, etc?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83275?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 17:03:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:daba15ba-6760-412e-a2d4-e3d1668505c1</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;It generates a &amp;quot;production order&amp;quot;, the order that the items should be produced in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83274?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 17:02:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1748b857-4ea5-4782-948c-a39aafa66acb</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;So entering / editing the number in the grid is what causes the order to be shipped?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83273?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 16:59:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b11d4fe2-f299-43d6-8265-353427ac7418</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;My apologize Mike, Yes in the form they enter or edit the number in the second column in an editable grid.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83268?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 16:36:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1d36c3da-0304-4b77-a590-a9d585dc3824</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="51202" url="~/discussions/f/user-interface/21343/auto-numbering/83267#83267"]I am hoping to figure out a way where when order is shipped and is no longer on the report as for what was number 5, that 6 would become 5.[/quote]
&lt;p&gt;This brings me back to the question from my first bullet point - what is the actual user interaction that precipitates this?&amp;nbsp; Is it something they do on-form?&amp;nbsp; Is it something that happens in an unrelated process model?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83267?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 16:33:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3a8496b-0c5d-42e7-8d7e-3b7541561c69</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;So the interface is written so that the user can assign a priority number to an order.&amp;nbsp; The second column is where they enter in the number and the third is what the current number is.&amp;nbsp; Duplicate numbers only happen if an order has 2 or more line items as shown with number 4.&amp;nbsp; I am hoping to figure out a way where when order is shipped and is no longer on the report as for what was number 5, that 6 would become 5.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto numbering</title><link>https://community.appian.com/thread/83265?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 16:26:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41ccf95c-b05a-4be5-842a-28b6672f9073</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Can you clarify your use case a bit?&amp;nbsp; I&amp;#39;m unclear&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;what user interaction on the form seen in your screenshot is intended to cause your desired change&lt;/li&gt;
&lt;li&gt;what the 2nd and 3rd columns are actually showing / doing&lt;/li&gt;
&lt;li&gt;which item(s) in the list you would expect to be affected after such user interaction takes place&lt;/li&gt;
&lt;li&gt;what logic would be used to address duplicates and/or gaps in the list of numbers&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>