<?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>Question with if block and validation</title><link>https://community.appian.com/discussions/f/user-interface/7843/question-with-if-block-and-validation</link><description>I am using an if block in the validation section of a text field which goes like--&amp;gt; if( isnull( ri!selectedCaseId ), { &amp;quot; The case ID you entered is not valid, Please try again&amp;quot; }, {} ) despite the check(condition ) being true, the validation message is</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32451?ContentTypeID=1</link><pubDate>Fri, 17 Jun 2016 02:43:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:77b52b7e-c380-4c44-9228-8f08455dbb0d</guid><dc:creator>ankushj</dc:creator><description>=or(ri!singlePV="", isnull(ri!singlePV),len(ri!singlePV)&lt;0)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32437?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 21:30:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57685ea6-35af-47ec-a071-b4327ecb6b22</guid><dc:creator>Karthik</dc:creator><description>check for length and if the length is zero, then you can return for a validation message, otherwise return nothing. I hope it helps you&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32431?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 19:41:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c630f1e3-2484-4d14-b15a-f65d1df2031c</guid><dc:creator>bhanuprakashm</dc:creator><description>Hi,  check null n count/ length of the text&lt;br /&gt;Like... If(or(isnull(ri! text), count(ri!text)&amp;lt;0), &amp;quot;display message&amp;quot;, &amp;quot;&amp;quot;).. &lt;br /&gt;Please check the value like this... It will help u...&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32430?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 19:05:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4f8720a8-0bb7-41be-9cff-aecc2a037fbc</guid><dc:creator>mohammedz</dc:creator><description>Hi akhikt..&lt;br /&gt;&lt;br /&gt;It is usual behaviour at times ... Instead using isnull() you can use APN_isBlank....&lt;br /&gt;&lt;br /&gt;Like if ( or (isnull(ri!input), ri!input=&amp;quot;&amp;quot;), &amp;quot;Your message&amp;quot; ,{}) ....&lt;br /&gt;&lt;br /&gt;Or rule!APN_isBlank(ri!input)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can try this at times null will not actually captured in isnull() fn!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32428?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:54:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0303e6bb-e4d4-4390-8d06-b06436fe2474</guid><dc:creator>robertp</dc:creator><description>As Kumaraveln mentioned, using a common text field is one option to display required messages, however a!validationMessage might be another option for editable grids. &lt;br /&gt;&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/help/16.2/SAIL_Components.html#ValidationMessage"&gt;forum.appian.com/.../SAIL_Components.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32426?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:48:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea64fe5c-59a8-4d0d-9188-246ce0e86431</guid><dc:creator>kumaraveln</dc:creator><description>As robertp mentioned, you can use requiredMessage if you are in recent version. In our case we use a common text field to display all custom required message when various fields in a grid are left empty.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32425?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:46:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a032ca53-ecdf-4d71-9a89-82484eba8d1c</guid><dc:creator>narasimhaadityac</dc:creator><description>Hi Akhlit, one quick question. why can&amp;#39;t you make the field as required and provide &amp;quot;requiredMessage&amp;quot; with validation message you are looking, than putting a validation rule?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32424?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:45:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b9cade0-820f-481c-9b04-dbd07bf5c1fa</guid><dc:creator>kumaraveln</dc:creator><description>@akhilt: Its an expected behavior. As per documentation validation messages appear only when the component's value is not null. i.e., you can only display custom formatting related error messages. Like characters cannot be greater than 20, special characters not allowed. But if you want custom message to be displayed when field is empty, you have to use a different component to display that message. PFA ..&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32423?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:45:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59cbb54e-8ab0-43eb-861e-c50dc98fef69</guid><dc:creator>robertp</dc:creator><description>Hi, I think the problem is that validations for text fields don&amp;#39;t validate null values:&lt;br /&gt; &lt;br /&gt;&amp;quot;validations : Validation errors to display below the field when the value is not null.&amp;quot;&lt;br /&gt;&lt;br /&gt;Try using required/required message&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question with if block and validation</title><link>https://community.appian.com/thread/32422?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 16:37:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4da3d261-67aa-4537-9bbf-653714d5a297</guid><dc:creator>Lakshmi Meyyappan</dc:creator><description>Can you double check that the parameter name is spelled correctly in the text field? If &amp;quot;validations&amp;quot; is misspelled or missing the &amp;quot;s&amp;quot; at the end then it will not function correctly.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>