<?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 Problem with setting values in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75729#M530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a custom edit-form. It is possible that some controls become invisible during the user enters data. If this happens, I want the script to set the values of these controls to zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Sub CheckFeatureValues
 Dim thisPage
 Set thisPage = Map.Layers("A").Forms("EDITFORM").Pages("A")
 If Not thisPage.Controls("txtWidth").Visible Then
&amp;nbsp; thisPage.Controls("txtWidth").Value = ""
 End If
End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I call this sub when the OnValidate-Event of the Form-Page "A" is fired. If I check the value of the control with a MsgBox ("MsgBox thisPage.Controls("txtWidth").Value"), the value is correctly set to "". But in spite of that the OLD value of the control is saved to the database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this happens and how to solve it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jan 2011 13:35:19 GMT</pubDate>
    <dc:creator>PeterBold</dc:creator>
    <dc:date>2011-01-31T13:35:19Z</dc:date>
    <item>
      <title>Problem with setting values</title>
      <link>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75729#M530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a custom edit-form. It is possible that some controls become invisible during the user enters data. If this happens, I want the script to set the values of these controls to zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Sub CheckFeatureValues
 Dim thisPage
 Set thisPage = Map.Layers("A").Forms("EDITFORM").Pages("A")
 If Not thisPage.Controls("txtWidth").Visible Then
&amp;nbsp; thisPage.Controls("txtWidth").Value = ""
 End If
End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I call this sub when the OnValidate-Event of the Form-Page "A" is fired. If I check the value of the control with a MsgBox ("MsgBox thisPage.Controls("txtWidth").Value"), the value is correctly set to "". But in spite of that the OLD value of the control is saved to the database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this happens and how to solve it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 13:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75729#M530</guid>
      <dc:creator>PeterBold</dc:creator>
      <dc:date>2011-01-31T13:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with setting values</title>
      <link>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75730#M531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I do not know if this could be the problem but you can only set values for controls on a page that is active. If Map.Layers("A").Forms("EDITFORM").Pages("A")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; is not active, the result of the thisPage.Controls("txtWidth").Value = "" is not reliable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 13:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75730#M531</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2011-01-31T13:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with setting values</title>
      <link>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75731#M532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your answer. I don't think that this was the problem, because when I tested this, the page was active.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I solved this by setting the values to zero whenever I set the control to "invisible". That works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 14:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/problem-with-setting-values/m-p/75731#M532</guid>
      <dc:creator>PeterBold</dc:creator>
      <dc:date>2011-02-04T14:48:48Z</dc:date>
    </item>
  </channel>
</rss>

