<?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: ArcPad Adding Fields together in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10381#M92</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not sure but..&lt;BR /&gt;&lt;BR /&gt;The control name should be between double quotes.&lt;BR /&gt;&lt;BR /&gt;...Controls("txtPole_In_CATV_1").Value&lt;BR /&gt;&lt;BR /&gt;Maybe this will help?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works!&amp;nbsp; OMG!&amp;nbsp; Details are killers....&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2012 15:44:34 GMT</pubDate>
    <dc:creator>JamesOwens</dc:creator>
    <dc:date>2012-02-13T15:44:34Z</dc:date>
    <item>
      <title>ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10376#M87</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have 2 fields:&amp;nbsp; Pole_Ft_CATV_1&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; Pole_In_CATV_1&amp;nbsp;&amp;nbsp; -&amp;nbsp; I need to add these 2 together (they are feet and then inches so it would be i.e. "12'10"".&amp;nbsp;&amp;nbsp; I then need to add the two fields Pole_Ft_Power_1&amp;nbsp; and&amp;nbsp; Pole_In_Power_1.&amp;nbsp; (Same situation)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I finally need to subtract the results of the CATV_1 addition from the results of the Power_1 addition and have that result be written into the field called Pole_Separation_1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it would be sum of (Pole_Ft_Power_1 + Pole_In_Power_1)&amp;nbsp; -&amp;nbsp; sum of ( Pole_Ft_CATV_1 + Pole_In_CATV_1)&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp; Pole_Separation_1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to this so please excuse the crudeness.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 17:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10376#M87</guid>
      <dc:creator>JamesOwens</dc:creator>
      <dc:date>2012-02-08T17:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10377#M88</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am going to make the assumption that all of these fields are on the same page within the form. If not please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there are two things we need to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. write the calculation so that it reads the correct fields and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. use a button or have something execute the calculation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, if all of the inputs are on one page then that makes things a little easier. If you add a button to the same page and call it btnCalculate, go to the events of the button and where it says OnClick - write: Call myCalculation(). So when you click the button it will look for the routine we are about to write. Press Ok to everything so you are interacting with the Layer Definition of the feature. Click on the scripting button to load a new script window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now If you have vbScript as your default language the window should have Option Explicit written at Line 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Under that write: sub myCalculation()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So taking your formula: (Pole_Ft_Power_1 + Pole_In_Power_1) - sum of ( Pole_Ft_CATV_1 + Pole_In_CATV_1) = Pole_Separation_1 the script could look something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;sub myCalculation()&lt;BR /&gt; 'Initiate some objects to store the measurements in&lt;BR /&gt; dim Pole_Ft_Power_1, Pole_In_Power_1, Pole_Ft_CATV_1, Pole_In_CATV_1, Pole_Separation_1&lt;BR /&gt; 'This long path is how you read values from a form. There are shorter methods you can write but this hopefully explains itself.&lt;BR /&gt; Pole_Ft_Power_1 = Application.Map.Layers("yourPoleLayer").Forms("EDITFORM").Pages("PAGE1").Controls(txtPole_Ft_Power_1).Value&lt;BR /&gt; Pole_In_Power_1 = Application.Map.Layers("yourPoleLayer").Forms("EDITFORM").Pages("PAGE1").Controls(txtPole_In_Power_1).Value&lt;BR /&gt; Pole_Ft_CATV_1 = Application.Map.Layers("yourPoleLayer").Forms("EDITFORM").Pages("PAGE1").Controls(txtPole_Ft_CATV_1).Value&lt;BR /&gt; Pole_In_CATV_1 = Application.Map.Layers("yourPoleLayer").Forms("EDITFORM").Pages("PAGE1").Controls(txtPole_In_CATV_1).Value&lt;BR /&gt;&lt;BR /&gt; 'This line now sets the calculation to another text box that is on your form.&lt;BR /&gt; Application.Map.Layers(yourPoleLayer).Forms("EDITFORM").Pages("PAGE1").Controls(txtPole_Separation_1).Value = (Pole_Ft_Power_1 + Pole_In_Power_1) - ( Pole_Ft_CATV_1 + Pole_In_CATV_1)&lt;BR /&gt;end sub&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 02:13:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10377#M88</guid>
      <dc:creator>GarethWalters</dc:creator>
      <dc:date>2012-02-10T02:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10378#M89</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi James,&lt;BR /&gt;&lt;BR /&gt;I am going to make the assumption that all of these fields are on the same page within the form. If not please let me know.&lt;BR /&gt;&lt;BR /&gt;there are two things we need to do:&lt;BR /&gt;1. write the calculation so that it reads the correct fields and&lt;BR /&gt;2. use a button or have something execute the calculation.&lt;BR /&gt;&lt;BR /&gt;Firstly, if all of the inputs are on one page then that makes things a little easier. If you add a button to the same page and call it btnCalculate, go to the events of the button and where it says OnClick - write: Call myCalculation(). So when you click the button it will look for the routine we are about to write. Press Ok to everything so you are interacting with the Layer Definition of the feature. Click on the scripting button to load a new script window.&lt;BR /&gt;&lt;BR /&gt;Now If you have vbScript as your default language the window should have Option Explicit written at Line 1.&lt;BR /&gt;&lt;BR /&gt;Under that write: sub myCalculation()&lt;BR /&gt;&lt;BR /&gt;So taking your formula: (Pole_Ft_Power_1 + Pole_In_Power_1) - sum of ( Pole_Ft_CATV_1 + Pole_In_CATV_1) = Pole_Separation_1 the script could look something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 10:06:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10378#M89</guid>
      <dc:creator>JamesOwens</dc:creator>
      <dc:date>2012-02-10T10:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10379#M90</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;[INDENT][/INDENT]Still isnt working.&amp;nbsp; Tried changing every variable.&amp;nbsp; Frustrating....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 15:22:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10379#M90</guid>
      <dc:creator>JamesOwens</dc:creator>
      <dc:date>2012-02-13T15:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10380#M91</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure but..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The control name should be between double quotes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...Controls("txtPole_In_CATV_1").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this will help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 15:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10380#M91</guid>
      <dc:creator>TimHopper</dc:creator>
      <dc:date>2012-02-13T15:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10381#M92</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not sure but..&lt;BR /&gt;&lt;BR /&gt;The control name should be between double quotes.&lt;BR /&gt;&lt;BR /&gt;...Controls("txtPole_In_CATV_1").Value&lt;BR /&gt;&lt;BR /&gt;Maybe this will help?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works!&amp;nbsp; OMG!&amp;nbsp; Details are killers....&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 15:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10381#M92</guid>
      <dc:creator>JamesOwens</dc:creator>
      <dc:date>2012-02-13T15:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10382#M93</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, the subtraction works but the adding is just concatenating (sp?) the values together instead of adding together.&amp;nbsp; What is the function symbol to add fields together?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 18:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10382#M93</guid>
      <dc:creator>JamesOwens</dc:creator>
      <dc:date>2012-02-13T18:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad Adding Fields together</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10383#M94</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to set them as integers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Application.Map.Layers(yourPoleLayer).Forms("EDITFORM").Pages("PAGE1").Controls("txtPole_Separation_1").Value = (int(Pole_Ft_Power_1) + int(Pole_In_Power_1)) - (int(Pole_Ft_CATV_1) + int(Pole_In_CATV_1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That should work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 19:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-adding-fields-together/m-p/10383#M94</guid>
      <dc:creator>TimHopper</dc:creator>
      <dc:date>2012-02-13T19:58:54Z</dc:date>
    </item>
  </channel>
</rss>

