Help with creating forms that loop, allowing multiple rows to be inputed

369
2
11-07-2011 10:47 PM
DanikBourdeau
New Contributor III
Hello All,

I need some advice and help creating a customization project.  I would like to know how to create a data entry form that just loops back to the begining allowing the field teams to enter multiple rows.

Essentially our field teams need to measure all the artefacts within a given sample square so I like would them to be able to simply touch an icon and have a form popup.  I would like the coordinates and sample square id to be automatically populated and then have the team enter the neccesary metrics.  I also don't want them to have to enter a new point for each artefact as there may be 100's in a sample square.

Any help would be greatly appreciated.

Thanks
Tags (3)
0 Kudos
2 Replies
RobertMcCann
New Contributor
Please clarify what coordinates you'd like populated.  Do you want the GPS location of the user or the center of the sample square?

Easiest method is to simply have them create new point features for each measurement.  This is the easiest and best method to capture the GPS coordinates of each measurement location and all they have to do is click the "Capture Point from GPS" button to pop open the edit form.  There is a little arcpad scripting to be done to get the current square ID from a polygon feature class.  If you don't have that, it is fairly simple to use the "repeat attributes" or a line of code onFormOpen and onFormOk events to auto fill that field.

Other easy option is to create a 1 to many relationship from the sample square polygon to a "readings" table.

There is no issue capturing hundreds of point features with arcpad and no reason you have to draw them on the map, you can just use the attributes table data.  This is the way that ESRI designed arcpad to function, diverting too far from it will cause you a significant amount of extra work and headaches doing the customization's.
0 Kudos
DanikBourdeau
New Contributor III
I'm still very unsure what the final product will look like.  Ideally I would like to have the coordinates of the sample square populate the form but I'm not sure how the sample grid will be presented.

Where the teams end up sampling is not known until we get to site.  We are hired to survey large areas (many sqr kms) for archaeological sites, which we do in transects.  When a team finds a site they will then start recording that site with sample squares (5m x 5m) every 25m or so.  When the team finds a site I want them to turn a sample grid layer on, easy enough, but I'm not sure what the sample grid layer will be.  I fear having a polygon fishnet will be too large of a layer for Arcpad, maybe not?

The problem with getting the teams to take points for each artefact is 1) it's an extra step that I wanted them to avoid, but more importantly 2) they don't always tend to stay inside the sample square to measure the artefacts.  Sometimes the teams will collect all the artefact and then go sit under a tree or in the truck and do the measrements there.  You see how this could lead to a scattering of points everywhere.

Ideally I wanted the teams to be able to initiate the data collection form inside the sample square, acquire the neccessary info (location, sample sqr ID) once and then have the form loop so they don't have to re-initiate the form over and over again.  I'm thinking instead of writing to a point shapefile the data should be written to a dbf?

How all this gets related back to the sample grid is still many steps ahead of me right now.  I just want to figure out how to get the data entry forms working.

So I'm thinking I need an applet which will add a button to the interface.  Once clicked it will initiate the form which will append to a dbf.

I found this script which will do approx what I want:
Sub MyScript
[INDENT]Dim objDBF
Set objDBF = Application.CreateAppObject("recordset")
objDBF.Open "C:\Program Files\ArcPad 7.0\Applets\MyDBF.dbf", 8
objDBF.MoveLast
objDBF.AddNew
objDBF.Fields("A").Value =
objDBF.Fields("B").Value =
objDBF.Update
objDBF.Close
Set objDBF = Nothing[/INDENT]End Sub

I"m thinking that with a DO loop I can get it to keep adding more rows until a 'Close Form' button is clicked?  Also, if the dbf is already present do I still need to add this line 'Set objDBF = Application.CreateAppObject("recordset")'.?

Thanks,
0 Kudos