<?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 - Simulate Required Attribute found in other components</title><link>https://community.appian.com/discussions/f/user-interface/12977/editable-grid---simulate-required-attribute-found-in-other-components</link><description>Hello all, 
 I am developing an application in Appian 17.2 and I have a case where i need to use an Editable Grid component in order for the user to create (and remove) a list of entries. 
 The requirement is that it is mandatory to enter at least ONE</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Editable Grid - Simulate Required Attribute found in other components</title><link>https://community.appian.com/thread/58389?ContentTypeID=1</link><pubDate>Thu, 26 Jul 2018 15:15:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19b28653-e6fd-4670-8716-e3232efc76f5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;A quick workaround I can think of, would be to add an empty, read-only text field either right above or right below the grid, with a &amp;quot;required&amp;quot; message configured to explain that at least one entry must be added; as soon as one entry is added, just hide the text field.&lt;/p&gt;
&lt;p&gt;Edit to add: please see the following quick example--&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!rows: {},
  a!formLayout(
    contents: {
      a!gridLayout(
        label: &amp;quot;My Entries&amp;quot;,
        headerCells: {
          a!gridLayoutHeaderCell(
            label: &amp;quot;Name&amp;quot;
          )
        },
        rows: a!forEach(
          local!rows,
          a!gridRowLayout(
            contents: {
              a!textField(
                value: fv!index,
                readOnly: true()
              )
            }
          )
        ),
        addRowLink: a!dynamicLink(
          label: &amp;quot;Add Entry&amp;quot;,
          saveInto: a!save(
            local!rows,
            append(
              local!rows,
              &amp;quot;new row&amp;quot;
            )
          )
        )
      ),
      a!textField(
        readOnly: true(),
        labelPosition: &amp;quot;COLLAPSED&amp;quot;,
        showWhen: length(local!rows) = 0,
        required: true(),
        requiredMessage: &amp;quot;At least one entry must be added.&amp;quot;
      )
    },
    buttons: a!buttonLayout(
      secondaryButtons: a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        validate: true()
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid - Simulate Required Attribute found in other components</title><link>https://community.appian.com/thread/58386?ContentTypeID=1</link><pubDate>Thu, 26 Jul 2018 15:02:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a41c5991-eafb-406c-ba02-3db2b49dcd28</guid><dc:creator>thanosm</dc:creator><description>I want to add to the above that we need this behaviour on both a!buttonWidget and a!buttonWidgetSubmit components. Not just the submit button.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>