<?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>condition on column in grid</title><link>https://community.appian.com/discussions/f/user-interface/10727/condition-on-column-in-grid</link><description>I need to put a condition on one of the columns in an editable that I&amp;#39;m using. The code that I&amp;#39;m currently using is not working. See the code below. There is a dropdown field in the grid and I have the condition on the &amp;#39;required&amp;#39; attribute in bold . </description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/47268?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2017 08:52:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4abfbf62-1030-4b8c-84ec-3daf0eb46d33</guid><dc:creator>Shivam Gupta</dc:creator><description>Hi sswilliams,&lt;br /&gt;
          This is how exact functions looks like &lt;br /&gt;
                     exact(text1, text2)&lt;br /&gt;
                     Compares two given Texts in a case-sensitive manner, returning true only if they are exactly the same&lt;br /&gt;
                     Returns: Boolean&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/47267?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2017 08:51:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5c71676c-6a7e-4d21-a27a-1c16e3efbb43</guid><dc:creator>Shivam Gupta</dc:creator><description>&lt;p&gt;check for the following things&lt;br /&gt; 1- check the type of ri!rejectApplicationsYN, it should be text&lt;br /&gt; 2- use a submit button like a!buttonWidgetSubmit() to show error&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; *remove the if statement as it is redundant here&lt;/p&gt;
&lt;p&gt;let me know if this doesn&amp;#39;t work out&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/46858?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 14:11:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b503e8d0-a722-40c0-82ef-2bde6303633d</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>&lt;p&gt;Hi sswilliams ,&lt;br /&gt; &lt;br /&gt; May i know the type of button you used, I mean a &amp;quot;Submit&amp;quot; or &amp;quot;Normal&amp;quot; button, If you are using &amp;quot;a!buttonWidget&amp;quot; then you should passed the Validate flag, eg&lt;br /&gt; &lt;br /&gt; a!buttonWidget(&lt;br /&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp;validate:true(),&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;label: &amp;quot;Submit&amp;quot;,&lt;br /&gt;&amp;nbsp; &amp;nbsp;style: &amp;quot;PRIMARY&amp;quot;,&lt;br /&gt;&amp;nbsp; &amp;nbsp;saveInto: {}&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/46851?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 12:33:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6a087e3a-3bb7-4528-9767-d409adcf6230</guid><dc:creator>sswilliams</dc:creator><description>Hi Alok.  Can you provide more details on this?  How do I use the extract function and what should I used instead of the if function?  The rule interface input is of text type.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/46850?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 12:31:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:42ae36cd-1ac2-423e-af88-ac0e8d388089</guid><dc:creator>sswilliams</dc:creator><description>Hi Kondetiv.  The code is not working for me.  The cell does not turn red as you have it displayed.  You mentioned in a previous response to  &amp;quot;make sure ri!rejectApplicationsYN variable should not be null. Because we cannot compare a null value with any other value. Try to put the null checks and verify the code once again.&amp;quot;  What do you mean by this.  How to I put the null checks?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/46824?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 23:29:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05ba4e6e-8043-4a83-affe-830b2d53d744</guid><dc:creator>kondetiv</dc:creator><description>&lt;p&gt;you have written correct code only. For editable grids, it doesn&amp;#39;t show up a * mark on the column. But if you try to submit without a value then the form will not be submitted.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the same code I tried and its working for me.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= a!formLayout(
  label: &amp;quot;Lorem Ipsum&amp;quot;,
  instructions: &amp;quot;Lorem Ipsum&amp;quot;,
  firstColumnContents: {
    a!gridLayout(
      headerCells: {
        a!gridLayoutHeaderCell(
          &amp;quot;Col1&amp;quot;
        ),
        a!gridLayoutHeaderCell(
          &amp;quot;Col2&amp;quot;
        ),
        a!gridLayoutHeaderCell(
          &amp;quot;Col2&amp;quot;
        )
      },
      rows: a!gridRowLayout(
        contents: {
          a!textField(
            label: &amp;quot;Application Name&amp;quot; &amp;amp; ri!indexRoles,
            value: ri!itemsRoles[ri!indexRoles].applicationName,
            saveInto: ri!itemsRoles[ri!indexRoles].applicationName,
            required: false,
            readOnly: true
          ),
          a!dropdownField(
            label: &amp;quot;Approved&amp;quot;,
            labelPosition: &amp;quot;ABOVE&amp;quot;,
            placeholderLabel: &amp;quot;--- Select a Value ---&amp;quot;,
            choiceLabels: {
              &amp;quot;Yes&amp;quot;,
              &amp;quot;No&amp;quot;
            },
            choiceValues: {
              &amp;quot;Yes&amp;quot;,
              &amp;quot;No&amp;quot;
            },
            value: ri!itemsRoles[ri!indexRoles].approved,
            saveInto: ri!itemsRoles[ri!indexRoles].approved,
            required: if(
              ri!rejectApplicationsYN = &amp;quot;Return to Customer&amp;quot;,
              true(),
              false()
            ),
            validations: {}
          ),
          a!imageField(
            label: &amp;quot;delete &amp;quot; &amp;amp; ri!indexRoles,
            images: a!documentImage(
              document: a!iconIndicator(
                &amp;quot;REMOVE&amp;quot;
              ),
              altText: &amp;quot;Remove&amp;quot;,
              caption: &amp;quot;Remove &amp;quot; &amp;amp; ri!itemsRoles[ri!indexRoles].applicationName,
              link: a!dynamicLink(
                value: ri!indexRoles,
                saveInto: {
                  a!save(
                    ri!itemsRoles,
                    remove(
                      ri!itemsRoles,
                      save!value
                    )
                  ),
                  /* When modifying the size of the array used in a!applyComponents,  */
                  /* make the same change in the &amp;quot;token&amp;quot; array variable               */
                  a!save(
                    ri!itemsTokenRoles,
                    remove(
                      ri!itemsTokenRoles,
                      save!value
                    )
                  )
                }
              )
            ),
            size: &amp;quot;ICON&amp;quot;
          )
        }
      )
    )
  },
  secondColumnContents: {
    /* Add components here for a two-column form */
    
  },
  buttons: a!buttonLayout(
    primaryButtons: {
      a!buttonWidgetSubmit(
        label: &amp;quot;Submit&amp;quot;,
        style: &amp;quot;PRIMARY&amp;quot;,
        saveInto: {}
      )
    },
    secondaryButtons: {
      a!buttonWidgetSubmit(
        label: &amp;quot;Cancel&amp;quot;,
        style: &amp;quot;NORMAL&amp;quot;,
        value: true,
        saveInto: ri!cancel,
        skipValidation: true
      )
    }
  ),
  validations: {}
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;output:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/grid-output.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/grid-output.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: condition on column in grid</title><link>https://community.appian.com/thread/46816?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 15:48:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5484ba6d-0de8-4fa2-b30e-ca51f2803eaa</guid><dc:creator>Alok Patro</dc:creator><description>Hi &lt;a href="/members/sswilliams"&gt;sswilliams&lt;/a&gt; ,&lt;br /&gt;
&lt;br /&gt;
Can you try the function : exact( ri!rejectApplicationsYN ,&amp;quot;Return to Customer&amp;quot; ) ?&lt;br /&gt;
Secondly, I would suggest not to use the if function . the resulting output of the function will be itself true or false.&lt;br /&gt;
Lastly, take care of the type for the rule input. It should be of type text.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>