<?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: Script Subtracting Fields to Populate Another Field in ArcPad 10 in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759818#M5473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff, that's really helpful as&amp;nbsp; I'm trying to do something similar. I want to add the contents of a number of fields and autopopulate a "Tally" field with the sum of these fields. I used your code, but when I substituted "+" for "-" it doesn't work. eg. If I enter "100" for the well depth and "20" for the GW depth, the water column thickness field is autopopulated with "10020". I'm not sure what he problem is - it appears to be adding the text string rather than the numerical values. The code&amp;nbsp; (called from the Onchange event in the GW depth field) I used was:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub SumFunction&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set objControl= ThisEvent.Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set objPage= ThisEvent.Object.Parent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; GWDepth= objControl.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Value + GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; objPage.Controls("TxtWat_Column").Value= WaterColumnThickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Feb 2011 01:21:45 GMT</pubDate>
    <dc:creator>CharlesHuxtable</dc:creator>
    <dc:date>2011-02-23T01:21:45Z</dc:date>
    <item>
      <title>Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759816#M5471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, I am new to ArcPad/Studio. I am running ArcPad 10 and I am looking to do the following. I have customized a form that our field crews will deploy to collect groundwater monitoring information. In an effort to minimize user input I wanted to come up with a script that would auto populate a field based on the input of another field. An example is as follows: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The crew member would enter a value into the field "GW Depth". The next field on the form is "Well Depth". This field is read only and already has a value associated with it. The next field on the form is "Water Column Thickness". "Water Column Thickness" is derived by subtracting "Groundwater Depth" from "Well Depth". I would like this field to auto populate once the crew member enters a value for "Groundwater Depth". I searched through ArcPad discussion forums and found a few scripts that may be what I am looking for. Below is my first stab at it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub SumFunction&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objEditForm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objEditForm = Application.Forms("EDITFORM").Pages("GWPage1").Controls("WaterColumnThickness")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;objEditForm("WaterColumnThickness") = objEditForm("GWDepth").Value - objEditForm("WellDepth").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From what I understand I open up &amp;lt;SCRIPT&amp;gt; in ArcPad Studio and enter the code above (no idea if it is even close to being correct). I would then go into the Events tab for the Water Column Thickness field and create an event under "onchange" that states: Call SumFunction. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once saved, I open the form in ArcPad and enter a value for GW depth. The Water Column Thickness field does not populate. Again, I am very new at Scripting/ArcPad, so any help or direction would be greatly appreciated.&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;JC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:16:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759816#M5471</guid>
      <dc:creator>jeffclonts</dc:creator>
      <dc:date>2011-02-22T15:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759817#M5472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After staring at it long enough I have solved my issue. The code that worked is attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objControl = ThisEvent.Object &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objPage = ThisEvent.Object.Parent&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GWDepth = objControl.Value&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaterColumnThickness = objPage.Controls("txtWell_Dep_TOC").Value - GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objPage.Controls("txtWat_Column").Value = WaterColumnThickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 20:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759817#M5472</guid>
      <dc:creator>jeffclonts</dc:creator>
      <dc:date>2011-02-22T20:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759818#M5473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff, that's really helpful as&amp;nbsp; I'm trying to do something similar. I want to add the contents of a number of fields and autopopulate a "Tally" field with the sum of these fields. I used your code, but when I substituted "+" for "-" it doesn't work. eg. If I enter "100" for the well depth and "20" for the GW depth, the water column thickness field is autopopulated with "10020". I'm not sure what he problem is - it appears to be adding the text string rather than the numerical values. The code&amp;nbsp; (called from the Onchange event in the GW depth field) I used was:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub SumFunction&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set objControl= ThisEvent.Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set objPage= ThisEvent.Object.Parent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; GWDepth= objControl.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Value + GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; objPage.Controls("TxtWat_Column").Value= WaterColumnThickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 01:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759818#M5473</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-02-23T01:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759819#M5474</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;SPAN&gt;The value of an Editbox control is string. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It might help if you use the field property of the controls to get the numbers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GWDepth= objControl.Field.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Field.Value + GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Jeff, that's really helpful as&amp;nbsp; I'm trying to do something similar. I want to add the contents of a number of fields and autopopulate a "Tally" field with the sum of these fields. I used your code, but when I substituted "+" for "-" it doesn't work. eg. If I enter "100" for the well depth and "20" for the GW depth, the water column thickness field is autopopulated with "10020". I'm not sure what he problem is - it appears to be adding the text string rather than the numerical values. The code&amp;nbsp; (called from the Onchange event in the GW depth field) I used was:&lt;BR /&gt;Sub SumFunction&lt;BR /&gt; Set objControl= ThisEvent.Object&lt;BR /&gt; Set objPage= ThisEvent.Object.Parent&lt;BR /&gt; GWDepth= objControl.Value&lt;BR /&gt; WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Value + GWDepth&lt;BR /&gt; objPage.Controls("TxtWat_Column").Value= WaterColumnThickness&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 18:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759819#M5474</guid>
      <dc:creator>RuiGe</dc:creator>
      <dc:date>2011-02-23T18:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759820#M5475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi GE,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried that, but got following error message :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Microsoft VBScript runtime error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object Required: ObjControl.Field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Line: 299, Col: 2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Source Text Unavailable"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 19:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759820#M5475</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-02-23T19:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759821#M5476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Chuxtable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I missed the first few lines of code when I pasted it into the message. Sorry about that. Hopefully it resolves your issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub SumFunction&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim objControl, objPage, GWDepth, WaterColumnThickness&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objControl = ThisEvent.Object &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objPage = ThisEvent.Object.Parent&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GWDepth = objControl.Value&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaterColumnThickness = objPage.Controls("txtWell_Dep_TOC").Value - GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objPage.Controls("txtWat_Column").Value = WaterColumnThickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also added some additional code to populate a few more fields on my form. Hopefully you can use these as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub SumFunction&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim objControl, objPage, GWDepth, WaterColumnThickness, GroundwaterElevation, CasingVolume&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objControl = ThisEvent.Object &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objPage = ThisEvent.Object.Parent&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calculates water column thickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GWDepth = objControl.Value&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaterColumnThickness = objPage.Controls("txtWell_Dep_TOC").Value - GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objPage.Controls("txtWat_Column").Value = WaterColumnThickness&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calculates groundwater elevation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GWDepth = objControl.Value&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GroundwaterElevation = objPage.Controls("txtWellElevation").Value - GWDepth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objPage.Controls("txtGWElevation").Value = GroundwaterElevation&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Calculates casing volume based on well casing diameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GWDepth = objControl.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If objPage.Controls("txtCasDiameter").Value = 1 then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CasingVolume = objPage.Controls("txtWat_Column").Value * 0.04&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Elseif objPage.Controls("txtCasDiameter").Value = 2 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CasingVolume = objPage.Controls("txtWat_Column").Value * 0.16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Elseif objPage.Controls("txtCasDiameter").Value = 4 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CasingVolume = objPage.Controls("txtWat_Column").Value * 0.65&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Elseif objPage.Controls("txtCasDiameter").Value = 6 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CasingVolume = objPage.Controls("txtWat_Column").Value * 1.47&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Elseif objPage.Controls("txtCasDiameter").Value = 8 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CasingVolume = objPage.Controls("txtWat_Column").Value * 10.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objPage.Controls("txtCasVolume").Value = CasingVolume&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are all run in the onchange event in my GW Depth control&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;later,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 16:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759821#M5476</guid>
      <dc:creator>jeffclonts</dc:creator>
      <dc:date>2011-02-24T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759822#M5477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I took a second look at the script -- you are using the "onchange" event on the GW Depth field so the "Field" property might not be useful in this case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "+" is actully concatenating the two strings instead of adding two numbers together. So the simple&amp;nbsp; conversion I can think of for this case is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GWDepth= objControl.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objPage.Controls("TxtWat_Column").Value = CDbl(objPage.Controls("TxtWell_Dep_TOC").Value) + CDbl (GWDepth)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;The value of an Editbox control is string. &lt;BR /&gt;It might help if you use the field property of the controls to get the numbers&lt;BR /&gt;&lt;BR /&gt;GWDepth= objControl.Field.Value&lt;BR /&gt;WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Field.Value + GWDepth&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 19:47:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759822#M5477</guid>
      <dc:creator>RuiGe</dc:creator>
      <dc:date>2011-02-24T19:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759823#M5478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great - that worked! Thanks Rui, and thanks Jeff for the additional script&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 23:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759823#M5478</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-02-27T23:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script Subtracting Fields to Populate Another Field in ArcPad 10</title>
      <link>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759824#M5479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Great - that worked! Thanks Rui, and thanks Jeff for the additional script&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Charles;&amp;nbsp; Thanks for the information in this thread. However, I am unsure just where to put the code in Arcstudio. Is it under the NewVBScript file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 18:31:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/script-subtracting-fields-to-populate-another/m-p/759824#M5479</guid>
      <dc:creator>AmandaSkelding</dc:creator>
      <dc:date>2012-06-26T18:31:25Z</dc:date>
    </item>
  </channel>
</rss>

