<?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>Editable Grid Validation</title><link>https://community.appian.com/discussions/f/user-interface/18702/editable-grid-validation</link><description>Hi all, 
 I have two editable grids in my interface and I would like to force the users to enter add at least one row each to the grids. How can I ensure users add a row each to my grid before they click submit? 
 Secondly, in an editable grid, is it</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Editable Grid Validation</title><link>https://community.appian.com/thread/73635?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 22:50:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:784b6f32-c77a-4d34-92a3-561c97040cfe</guid><dc:creator>nanfak</dc:creator><description>&lt;p&gt;Thanks Peter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid Validation</title><link>https://community.appian.com/thread/73634?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 21:44:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ce4ad8a-bfe7-42b8-b9e7-6e1f21d24994</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;The easiest way is just to add a validation to the &lt;strong&gt;validation&lt;/strong&gt; parameter in your grid. Suppose you are saving the data of your grid into a local variable called local!rows. The following validation would ensure they must add at least one row:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  or(
    isnull(local!rows),
    length(local!rows)&amp;lt;1
  ),
  &amp;quot;Please add at least one row&amp;quot;,
  null
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You could potentially do the same for the maximum number - just check the length against a maximum value.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d also suggest thinking about the best user experience for your users. If they are required to enter at least one row, should you start with a row already added (with maybe a few suggested values)? Or if you want to limit the number of rows, maybe you should hide the &amp;quot;Add Row&amp;quot; link after they have reached a certain number of rows. Validations are usually the easiest but may not be the best experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>