<?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>Problem with auto-generated numbers in an editable grid</title><link>https://community.appian.com/discussions/f/user-interface/29819/problem-with-auto-generated-numbers-in-an-editable-grid</link><description>Hi! I created an editable grid in which the user can add new rows. When the user adds a new row, a number is auto-generated (1 for the first row, 2 for the second one, etc). 
 
 
 My problem here is that, when I run it in the process model, the first</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Problem with auto-generated numbers in an editable grid</title><link>https://community.appian.com/thread/118317?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 08:56:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3a0d720-6aab-4f13-8f7f-935af67e8b45</guid><dc:creator>carlosp5114</dc:creator><description>&lt;p&gt;Thanks a lot Stefan! You were right, just by initializing the local variable in the line two the error disappears. Now it works properly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with auto-generated numbers in an editable grid</title><link>https://community.appian.com/thread/118315?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 08:34:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b65c4ec-4a3b-4ae6-99c1-835fb0c95832</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Sure. That is because now, you put a NULL value into a list and try to count the items in that list. That will again evaluate to &amp;quot;1&amp;quot; in case the local variable is NULL.&lt;/p&gt;
&lt;p&gt;I repeat my suggestion: &amp;quot;I suggest to i&lt;strong&gt;nitialise&lt;/strong&gt; it using &amp;quot;{}&amp;quot;.&amp;quot;&lt;/p&gt;
&lt;p&gt;You need to do that in line 2 of your code in the initial post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with auto-generated numbers in an editable grid</title><link>https://community.appian.com/thread/118313?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 08:19:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57e8429a-2e21-4160-bbda-314598c2f6ec</guid><dc:creator>carlosp5114</dc:creator><description>&lt;p&gt;Thanks Stefan! I have changed the expression to count({}) but it&amp;acute;s happening the same&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1693383509849v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with auto-generated numbers in an editable grid</title><link>https://community.appian.com/thread/118311?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 08:05:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6234afbb-a094-4431-8094-4c8e3b6f8d7b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;That&amp;#39;s simple. count() includes NULL values. In the initial state, your local variable in line 2 holds a single NULL value. I suggest to initialise it using &amp;quot;{}&amp;quot;. This makes it an empty list. Then count({}) equals zero.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>