<?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>Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/discussions/f/process/12375/make-a-field-required-based-on-value-in-grid-editablegrid</link><description>I have an editable grid in my interface. I need to make a text field required based on values in one column of the grid. I have used the following statements in the required attribute of the text filed: 
 if(contains(ri!itemsRoles.InfoSecDisposition,</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/thread/54873?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 15:06:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:74003b03-8ede-4c25-85df-c7bc1bfdc052</guid><dc:creator>sswilliams</dc:creator><description>That worked!  :) Thanks so much!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/thread/54854?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 09:38:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b2f41798-e0e0-4852-84da-e6f38fb6ffcc</guid><dc:creator>Aditya</dc:creator><description>You can try and use the find() function instead of contains()&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/thread/54847?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 07:20:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:91451d60-7b03-4cdf-9f0f-ffbec8e90fed</guid><dc:creator>mohamedt808</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Place a null or empty array check for ri!itemRoles before the evaluation of the condition.&lt;/p&gt;
&lt;p&gt;i.e. &lt;pre class="ui-code" data-mode="text"&gt;if(
or(ri!itemRoles=&amp;quot;&amp;quot;,ri!itemRoles=null),
false(),
contains( 
   touniformstring(ri!itemsRoles.InfoSecDisposition),
   cons!VALUE_TO_CHECK)
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will evaluate the condition only if the array is not empty or null. Also Would suggest using constants for storing the value(s) which you would like to check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/thread/54843?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 06:53:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:947edda7-b72a-4dbf-bbfd-77b16450ff6d</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>Hi,&lt;br /&gt;
&lt;br /&gt;
please check if the value is null on ri!itemsRoles variable, using of index will solve your problem&lt;br /&gt;
&lt;br /&gt;
if(&lt;br /&gt;
  contains(&lt;br /&gt;
       touniformstring(index(ri!itemsRoles,&amp;quot;InfoSecDisposition&amp;quot;,null)),&lt;br /&gt;
       &amp;quot;Return to Customer&amp;quot;&lt;br /&gt;
   ),false(),true()&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make a field required based on value in grid. #EditableGrid</title><link>https://community.appian.com/thread/54833?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 05:20:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:206a54ac-bbd4-47ca-a5be-197ae9fb0b25</guid><dc:creator>TJ</dc:creator><description>&lt;p&gt;Can you please try this :&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;if(&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp;contains(&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp; &amp;nbsp;ri!itemsRoles.InfoSecDisposition,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp; &amp;nbsp;touniformstring(&amp;quot;Return to Customer&amp;quot;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp;),&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp;false(),&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&amp;nbsp;true()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If this doesn&amp;#39;t work out can you also cross check the type of variable declared.&lt;/p&gt;
&lt;p&gt;Let me know it works out or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>