Tuesday, May 5, 2009

ArcPad Tips & Tricks #3: Related Table Support

There has been a little bit of confusion from some of our clients surrounding the support of related tables within ArcPad, using the AXF file format. Here are some basic rules which should help to clear things up:

  1. One-to-many, and one-to-one relationships are supported. Many-to-many are not.
  2. Related tables must be just that, tables, and not feature classes.
  3. The parent in the relationship must be a feature class (point, line or polygon). This is in keeping with the map-centric focus of ArcPad, where all editing is done via the map.
  4. You can relate as many tables to the base feature class as you like.
  5. You must have a Geodatabase relationship class set up in order for a related table to be exported. Any joins or relates that you set up within your ArcMap mxd document will not be exported.

Related tables are an extremely useful tool to have out in the field, as they eliminate the need to duplicate spatial features that define the same location in space. For example, you may have a tree / inspection (one-to-many) scenario. Without related tables, each time you do an inspection, the location of the tree would have to be recaptured, when in fact it probably hasn't moved. Over a period of time, you will end up with a whole heap of points stacked on top of one another. With related tables, you would only collect one point – that on the initial inspection. From then on, only tabular data is collected. This leads to significant performance improvements also, as fewer features have to be drawn.


Jim said...

Hi Luke, AXF files are obviously the way of the future but how do you go about setting up forms that enable you to populate the related table in ArcPad. Added to that, can coded values be brought across in the AXF to populate fields in the related table from that form?

Luke said...

Hi Jim, yes I think you are right - AXF files offer huge potential, and will definitely be the way of the future.
You can develop edit forms for related tables, however it is a bit tricky. Unlike with the feature classes, you need to manage the inserting, updating and deleting of related features using code. The object you need to look at is the DataSource object.
Unfortunately that is the only way at the moment. I should imagine it will be something that gets addressed in future releases of ArcPad.

Gilles said...

What was the version of arcpad you're talking about in this post (because i have to develop a tool for 7.1.1, 8 and 10) ?
Thanks !

Luke said...

Hi Gilles,

Related tables were introduced in version 7.1 so you are in luck!

There shouldn't be any major concerns developing a tool for all three versions. There will however be some functions/properties of certain objects that work in one version, but not another. I would probably recommend developing for 7.1 (as it has the least functionality) then updating your application for versions 8 and 10 as required.

Good luck!