<?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>user interface validations</title><link>https://community.appian.com/discussions/f/user-interface/24498/user-interface-validations</link><description>Hi, 
 I have a form which I am using to edit a record. 
 I have a validation in the field like when the user tries to enter some number, I am have to ensure it is not existing. For this I have written a rule and ensuring the user is not enter the existing</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: user interface validations</title><link>https://community.appian.com/thread/94632?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 03:52:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c982b349-2c20-416f-b585-160063517ce3</guid><dc:creator>Hari Kishore Reddy</dc:creator><description>&lt;p&gt;Great explanation. Thank you so much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: user interface validations</title><link>https://community.appian.com/thread/94621?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 19:28:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:53029834-7c85-41ff-ab32-9d5ac36f396b</guid><dc:creator>Naresh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is my understanding, ex: you submitted a new request with a filed (Ex: Property Number) value as 123, this filed have a validation to make sure user is not entering a property number value which is already in the system. I think the issue you are facing after submitting the request, when you try to edit the same request by default it is&amp;nbsp;throwing validation error, since your validation checks the current value against the data base values (Here your expectation is&amp;nbsp; we shouldn&amp;#39;t show validation message since this is an existing request and user didn&amp;#39;t modify the value). If this is what you are issue is,&amp;nbsp;You need to update your validation logic to skip validation if it is an existing request and user didn&amp;#39;t modify any value&lt;/p&gt;
&lt;p&gt;Try this logic, it should work.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;a!localVariables(
  local!initialValue: a!refreshVariable(
    /*save your rule input value here on load*/
    value: ri!propertyNumber,
    refreshOnReferencedVarChange: false
  ),
  /*Existing number to compare - */
  local!existingNumbers: {345, 678, 199},
  {
    a!textField(
      label: &amp;quot;Property Number&amp;quot;,
      value: ri!propertyNumber,
      saveInto: ri!propertyNumber,
      validations: {
        if(
          and(
            a!isNotNullOrEmpty(ri!propertyNumber),
            local!initialValue &amp;lt;&amp;gt; ri!propertyNumber,
            contains(local!existingNumbers, ri!propertyNumber)
          ),
          &amp;quot;This ID is exist&amp;quot;,
          &amp;quot;&amp;quot;
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: user interface validations</title><link>https://community.appian.com/thread/94620?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 19:07:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:31dc5bd5-f079-46c0-a700-377115b7d223</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If your rule would accept a null value as a valid value, would that problem not go away?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: user interface validations</title><link>https://community.appian.com/thread/94618?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 18:26:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1ef3519d-a3e0-4bc9-872c-b3626536694e</guid><dc:creator>Danny Verb</dc:creator><description>&lt;p&gt;The component will use the current value at the time.&amp;nbsp;This is also a UX best practice because users should be aware of issues upon load. The other option is to run validation upon submission of a form instead of at the component level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>