<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Stop form 'Cancel' execution in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382638#M2805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, no one has an answer for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could really use help on this!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even if the only solution is number 3 where you have to write directly to record (for UID values) upon data entry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not really sure how to go about doing this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One issue I forsee, is when you are adding a new feature as opposed to editing an existing one (as there will be no record found to write to). But perhaps a sub could be set up so that - upon placement of a new parent feature, the form would enter any auto calculated values, then exit and re-enter - all without bringing attention to the user (except perhaps a second of lag).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any input on this anyone?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Apr 2013 14:54:10 GMT</pubDate>
    <dc:creator>AaronAmbrose</dc:creator>
    <dc:date>2013-04-30T14:54:10Z</dc:date>
    <item>
      <title>Stop form 'Cancel' execution</title>
      <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382637#M2804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I have created a form that has a page that references child forms. Children can be added and reopened for editing from this page; very similar to 'related tables.' And they are associated thru a set of parent / child UIDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One major problem I am having with it all though, is that when a user clicks cancel (whether by choice or by accident) on one of the child forms, the dang data collectors very often treat the tap as a double tap, and so the second tap hits the cancel of the Parent form - completely orphaning all the children because the UID association is now NOT written.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a major issue - as data can be entered for up to an hour or two on each item! Plus, now we have a bunch of orphaned elements that cause other problems downstream.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I figured it would be an easy fix; just put a validation script ("ThisEvent.Result = False...") in the parent form 'Cancel' button that scouts for children and if found - dis-allows cancel execution. But this doesn't seem to work as it does on validation events. Nothing happens...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, is there a way to either,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) stop execution of the event onclick of Cancel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) hide or disable the Cancel button?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c) write certain values to the perminanct record upon entry or specific event?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;d) or even if I could move the Cancel button location on the parent form so inadvertent double tapping/execution doesn't occur&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Choices 'a &amp;amp; b' would be preferred, but I am expecting 'c' to be the only solution from the vets here. But even if it is, I think I will need an example code for it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Aaron&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 12:29:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382637#M2804</guid>
      <dc:creator>AaronAmbrose</dc:creator>
      <dc:date>2013-04-18T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Stop form 'Cancel' execution</title>
      <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382638#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, no one has an answer for this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could really use help on this!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even if the only solution is number 3 where you have to write directly to record (for UID values) upon data entry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not really sure how to go about doing this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One issue I forsee, is when you are adding a new feature as opposed to editing an existing one (as there will be no record found to write to). But perhaps a sub could be set up so that - upon placement of a new parent feature, the form would enter any auto calculated values, then exit and re-enter - all without bringing attention to the user (except perhaps a second of lag).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any input on this anyone?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 14:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382638#M2805</guid>
      <dc:creator>AaronAmbrose</dc:creator>
      <dc:date>2013-04-30T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Stop form 'Cancel' execution</title>
      <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382639#M2806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know this thread is a little old, but just in case anyone else was wondering...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know of a way to hide the Cancel button, but you can override it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;result = Msgbox("You have clicked the Cancel button.&amp;nbsp; This will cause the form to close." &amp;amp; vbcrlf &amp;amp; "Are you sure you want to quit?", 1 ,"Cancel Verification")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if result = 2 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisevent.result=false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add this script to the OnQueryCancel event in the Page Properties of the form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 12:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382639#M2806</guid>
      <dc:creator>SandraDema</dc:creator>
      <dc:date>2013-05-15T12:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Stop form 'Cancel' execution</title>
      <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382640#M2807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will try this out as soon as I get some time; if it works; God bless you Ssdema!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 13:00:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382640#M2807</guid>
      <dc:creator>AaronAmbrose</dc:creator>
      <dc:date>2013-05-15T13:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Stop form 'Cancel' execution</title>
      <link>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382641#M2808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I know this thread is a little old, but just in case anyone else was wondering...&lt;BR /&gt;&lt;BR /&gt;I don't know of a way to hide the Cancel button, but you can override it.&lt;BR /&gt;&lt;BR /&gt;dim result&lt;BR /&gt;result = Msgbox("You have clicked the Cancel button.&amp;nbsp; This will cause the form to close." &amp;amp; vbcrlf &amp;amp; "Are you sure you want to quit?", 1 ,"Cancel Verification")&lt;BR /&gt;if result = 2 then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisevent.result=false&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Add this script to the OnQueryCancel event in the Page Properties of the form.&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow! You Rock ssdema!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I finally got to test it out; all I really needed was 'thisevent.result=false' (plus any appropriate alert message or 'if' statement).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I find odd though, is that I had tried this very method, only using it on the 'Form' OnCancel event, and anything I scripted in worked, except this statement ('thisevent.result=false'). I never even thought to look for this type of event on 'page' events.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well thanks a billion - this solves a big problem for me!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And I know that many other people want this little nugget too, as I discovered while googling for an answer (with no avail).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers ssdema!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 10:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/stop-form-cancel-execution/m-p/382641#M2808</guid>
      <dc:creator>AaronAmbrose</dc:creator>
      <dc:date>2013-05-16T10:20:50Z</dc:date>
    </item>
  </channel>
</rss>

