<?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 Fields won't calculate in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87452#M659</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 am trying to get Arcpad to perform a simple calculation but for some reason it won't do it. Can anyone tell me why this won't work? It is entered in the Form Properties Events under "onOK".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objPage, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage1 = ThisEvent.Object.Pages("Page1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage2 = ThisEvent.Object.Pages("Page2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objPage2.Controls("Pctdmgvine").Value = CDbl(objPage2.Controls("AvgDmgVine").Value / CDbl(objPage1.Controls("AvgBdsVine").Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Apr 2013 17:21:46 GMT</pubDate>
    <dc:creator>AmandaSkelding</dc:creator>
    <dc:date>2013-04-16T17:21:46Z</dc:date>
    <item>
      <title>Fields won't calculate</title>
      <link>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87452#M659</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 am trying to get Arcpad to perform a simple calculation but for some reason it won't do it. Can anyone tell me why this won't work? It is entered in the Form Properties Events under "onOK".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objPage, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage1 = ThisEvent.Object.Pages("Page1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage2 = ThisEvent.Object.Pages("Page2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objPage2.Controls("Pctdmgvine").Value = CDbl(objPage2.Controls("AvgDmgVine").Value / CDbl(objPage1.Controls("AvgBdsVine").Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87452#M659</guid>
      <dc:creator>AmandaSkelding</dc:creator>
      <dc:date>2013-04-16T17:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fields won't calculate</title>
      <link>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87453#M660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think it has to do with the event that you are tying it to; the OnOK event. I tried to run a script here the other day too and no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that when you try and change values after pressing OK, it ain't gonna happen. Which seems pretty ridiculous if you ask me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would love it if there was a work around to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try adding a msgbox("see if this pops up") to your script. I bet you see the message pop up, but still no field value change..., go figure&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 12:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87453#M660</guid>
      <dc:creator>AaronAmbrose</dc:creator>
      <dc:date>2013-04-18T12:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fields won't calculate</title>
      <link>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87454#M661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Aronius1; I got this to work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objPage&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage = ThisEvent.Object.Pages("Page1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage2 = ThisEvent.Object.Pages("Page2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objPage2.Controls("Avgdmgvine").Field.Value = CDbl(objPage2.Controls("Cntdmg5vin").Value)/5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objPage2.Controls("Pctdmgvine").Field.Value = CDbl(objPage2.Controls("Avgdmgvine").Field.Value) / CDbl(objPage.Controls("Avgbdsvine").Field.Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the onOK event used is under the Form Controls properties (if that makes a difference or not I'm not sure). Oddly though this only works for a shapefile. When I tried to use it on a Feature Class from a GDB it produces different pages and thus doesn't work yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 02:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/fields-won-t-calculate/m-p/87454#M661</guid>
      <dc:creator>AmandaSkelding</dc:creator>
      <dc:date>2013-04-19T02:21:36Z</dc:date>
    </item>
  </channel>
</rss>

