Select to view content in your preferred language

Form to vbs back to form, ArcPad10

749
3
Jump to solution
04-26-2012 12:33 PM
TomPotter
Deactivated User
There is very little documentation on using vbscript within a layer form.  Any help with syntax would be appreciated.

Within my subroutine, I want to grab some numerical data entered in a control box on the form.  Will this Set command grab the data that was input and assign it to the variable el1?

Sub getdata
   Dim el1
Set el1 = EDITFORM.Pages.Item("page4").Controls.Item("element1")
End Sub


To bring data from the vbscript back to a control box on the form, assuming I have calculations done correctly for "scoreA"

EDITFORM.Pages.Item("Results").Controls.Item("sumEl").Additem scoreA, scoreA

Is this the proper way to reference data in a control box?  It was copied from an earlier version of ArcPad.
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RolfBroch
Frequent Contributor
Attached is a simple applet that illustrates how to read values in a form, do a calculation in the form and display the result in the form.

Hope it helps.

Unzip the file into your applets directory, start up ArcPad, Click on the Bex toolbar and the Bex toolitem. The code is in the .txt file

Rolf

View solution in original post

0 Kudos
3 Replies
KevinBurke
Esri Contributor
Hello,

The best location for assistance with ArcPad Studio, as far as documentation is concerned, would be to go to Start > All Programs > ArcGIS > ArcPad 10 > Developer Help > Customizing ArcPad. This documentation provides examples and explanations about the different types of controls on the Forms. Just type in the Search tab what you are looking for.

Also, for further assistance, I would recommend utilizing the ArcPad Samples. For the Redlands Sample, for example, you could open the Trees.apl in ArcPad Studio and be able to see how they set up their .vbs script and how they linked it with the Edit Form controls.

I hope this helps you out.

Thank you.
0 Kudos
TomPotter
Deactivated User
Thanks, but the documentation provides absolutely no help.

I am making progress.  Figured out how to pull data from the form and get a sum in vbscript.  Still haven't figured out how to return that sum back to the form
0 Kudos
RolfBroch
Frequent Contributor
Attached is a simple applet that illustrates how to read values in a form, do a calculation in the form and display the result in the form.

Hope it helps.

Unzip the file into your applets directory, start up ArcPad, Click on the Bex toolbar and the Bex toolitem. The code is in the .txt file

Rolf
0 Kudos