Add XY data of current location to related table (1:M) in custom form

678
2
Jump to solution
03-26-2013 11:21 AM
ChrisCzerwinski1
New Contributor III
I'm developing a stream monitoring data collection application that uses 3 related tables.

The top level of the database uses point data to locate a monitoring site, but then off of that point there is a related table that will have 3 rows (3 separate sample locations) for each point. The locations of these sample sites changes year to year due to stream morphology, and it would be ideal to be able to record the xy of each sample site for each year.

Currently I can write XY data to the related table using an onload event and the code below, but the problem is, I don't get the current GPS position, rather I get the XYs of the feature point driving the relationship.  Any help on this would be great!

So the real question is: How can I write the the current GPS location to a related table (I don't want to create a shapefile, just tabular data).

Cheers.

Dim objPage, objControls
Set objPage = ThisEvent.Object
Set objControls = objPage.Controls

objPage.Controls("E").Value = GPS.X
objPage.Controls("N").Value = GPS.Y
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ChrisCzerwinski1
New Contributor III
I didn't figure out the exact solution to the problem, but found a work around that is appropriate for the specific application.

Currently, when the user pulls up the form for the related table, they will see the last Easting and Northing recorded for the last time the sample location was visited (which can change year to year).  Since I can't figure out how to automatically assign GPS.X and GPS.Y to a field in a related table, I created a button that displays the co-ordinates instead.  The user can edit the UTMs accordingly, to account for (and record) minor adjustments to the sample location each time it is visited.

<BUTTON onclick="Messagebox GPS.X" name="Easting_button" x="3" y="18" width="10" height="12" caption="E" tooltip="" tabstop="true" border="false" alignment="center">


Regardless of this work around, I still would like to learn how to assign GPS.X and GPS.Y as a record in a related table.

Cheers.

View solution in original post

0 Kudos
2 Replies
ChrisCzerwinski1
New Contributor III
No luck so far.
I've also tried it using:

objPage.Controls("E").Value = Application.GPS.X


And I tried creating current XY position as a global variable too.
I get no error messages, just no changes to my related table fields.

I know my GPS is working, but maybe it's not "talking" to arcpad?



I'm developing a stream monitoring data collection application that uses 3 related tables.

The top level of the database uses point data to locate a monitoring site, but then off of that point there is a related table that will have 3 rows (3 separate sample locations) for each point. The locations of these sample sites changes year to year due to stream morphology, and it would be ideal to be able to record the xy of each sample site for each year.

Currently I can write XY data to the related table using an onload event and the code below, but the problem is, I don't get the current GPS position, rather I get the XYs of the feature point driving the relationship.  Any help on this would be great!

So the real question is: How can I write the the current GPS location to a related table (I don't want to create a shapefile, just tabular data).

Cheers.

Dim objPage, objControls
Set objPage = ThisEvent.Object
Set objControls = objPage.Controls

objPage.Controls("E").Value = GPS.X
objPage.Controls("N").Value = GPS.Y
0 Kudos
ChrisCzerwinski1
New Contributor III
I didn't figure out the exact solution to the problem, but found a work around that is appropriate for the specific application.

Currently, when the user pulls up the form for the related table, they will see the last Easting and Northing recorded for the last time the sample location was visited (which can change year to year).  Since I can't figure out how to automatically assign GPS.X and GPS.Y to a field in a related table, I created a button that displays the co-ordinates instead.  The user can edit the UTMs accordingly, to account for (and record) minor adjustments to the sample location each time it is visited.

<BUTTON onclick="Messagebox GPS.X" name="Easting_button" x="3" y="18" width="10" height="12" caption="E" tooltip="" tabstop="true" border="false" alignment="center">


Regardless of this work around, I still would like to learn how to assign GPS.X and GPS.Y as a record in a related table.

Cheers.
0 Kudos