<?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>dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/discussions/f/user-interface/14717/datefield-saveinto-logic-executed-on-invalid-date-entered</link><description>We observed dateField saveInto code executed even though user enters invalid Date manually. We see OOTB validation error message on screen but save logic getting executed successfully. 
 
 =&amp;gt; =&amp;gt;</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65947?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:39:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b2e6000-2491-4a67-9fbd-6ca64773f4d6</guid><dc:creator>manjunathb58</dc:creator><description>&lt;p&gt;Yes, we added logic to perform date validation before executing any saveInto logic&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65946?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:37:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be70169b-f101-4400-ab90-3c9ead325b70</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Remember that a user can also clear out a date field, which has the same effect as entering an invalid date (other than not showing an error message on the date picker component when blank, anyway).&amp;nbsp; Therefore if this is an issue for you I&amp;#39;d suggest perhaps moving your verification service calls to a button or Rich Text link, if possible, where you could control when the user is able to do it, and not enable it until a valid date is entered (and any other on-form data that should nominally be required first).&lt;/p&gt;
&lt;p&gt;Then again maybe just wrapping the service calls in a null check would work, if you don&amp;#39;t want to make the user perform an additional click.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65945?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:30:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:723064d3-0950-494e-b28e-ae79b5a00146</guid><dc:creator>manjunathb58</dc:creator><description>&lt;p&gt;We have service call on entering date to do certain validations in the backend and we observed service errors saying date should not be null.&lt;/p&gt;
&lt;p&gt;Since date field was mandatory in the interface we were thinking in what scenarios date can go blank. Then realized user entered invalid date by typing instead of selecting from calendar. That triggered service calls with no or null date.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65944?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:26:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c27d6e1-b29d-4849-ae56-d18ce1a8af7d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Do you have a particular use case where the current behavior is producing unexpected or undesired results, out of curiosity?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65943?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:23:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7a04af97-3345-4078-a8bf-e28b4cb6f49b</guid><dc:creator>manjunathb58</dc:creator><description>&lt;p&gt;Thanks Mike for details. I agree with you the way its expected to work.&lt;/p&gt;
&lt;p&gt;Then I think its better to check for entered date value for null before doing any save activities if the entered date value as any impact.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65942?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 19:11:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:58ce6609-d0f1-4f47-95c0-22e69e10fe69</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure why you&amp;#39;re expecting anything different to happen - your SaveInto attempts to save the value of the entered date, fails, and then executes the other saves as normal (executing the logical path matching local!tempDate being blank, it looks like).&lt;/p&gt;
&lt;p&gt;Do you have some reason to believe it shouldn&amp;#39;t work like this?&amp;nbsp; I don&amp;#39;t personally know of any documentation suggesting that when one member of the saveInto array is invalid, that subsequent saves shouldn&amp;#39;t complete executing.&lt;/p&gt;
&lt;p&gt;Please see if the attached sample (my own form that&amp;#39;s similar to your original one but with some added stuff) helps clarify on this at all for you...&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;load(
  local!tempDate: null(),
  local!lastInteractionText: null(),
  local!interactionsCounter: 0,
  
  a!sectionLayout(
    contents: {
      a!dateField(
        value: local!tempDate,
        saveInto: {
          local!tempDate,
          a!save(
            local!lastInteractionText,
            if(
              rule!GBL_isBlank( save!value ),
              &amp;quot;Last interaction did not successfully save a valid date.&amp;quot;,
              &amp;quot;Last interaction saved a value successfully.&amp;quot;
            )
          ),
          a!save(
            local!interactionsCounter,
            local!interactionsCounter + 1
          )
        }
      ),
      
      a!textField(
        label: &amp;quot;Date Value...&amp;quot;,
        value: local!tempDate,
        disabled: true()
      ),
      a!textField(
        label: &amp;quot;Status...&amp;quot;,
        value: local!lastInteractionText,
        disabled: true()
      ),
      a!textField(
        label: &amp;quot;Interaction Count...&amp;quot;,
        value: local!interactionsCounter,
        disabled: true()
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65939?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 18:50:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:49ea0eab-b7c6-4b1b-8308-56387d2c2618</guid><dc:creator>manjunathb58</dc:creator><description>&lt;p&gt;I used GBL_isBlank (custom rule to check for blank and null values) to demonstrate the behavior. We are confident about this rule and its working as expected.&lt;/p&gt;
&lt;p&gt;The issue that I&amp;#39;m reporting here is why saveInto is getting executed in case of invalid date is entered. The validation message that you see is OOTB not custom validation.&lt;/p&gt;
&lt;p&gt;Just to be clear see below screenshot where the date entered in not valid (OOTB validation error is shown on screen) but saveInto logic executed successfully.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1555440932135v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dateField saveInto logic executed on invalid date entered</title><link>https://community.appian.com/thread/65937?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 17:50:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f872221f-1bd6-4d14-8e1f-0129e539ec4d</guid><dc:creator>ramaseshur515</dc:creator><description>&lt;p&gt;The problem is with your rule!GBL_isBlank. It is not getting excecuted properly. Please check that rule.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>