The ArcPad Team Blog

Unofficial stuff from the team behind the World's leading mobile GIS platform

Monday, September 03, 2012

User Requested Sample - Incrementing ID's

Hi Everyone,

We had a request at this year’s User Conference to show how build a simple incremental counter. The scenario was that there are multiple people collecting data but each collector has been given a starting range e.g. Fred: 20000 and Barney: 50000.

This range could change from day to day so the ability to change the number was also important. Using ArcPad’s input box, each user can open the map and type in their starting value and then two, one line, scripts will keep it up to date.

This sample has been written into the Edit Form (APL) rather than an applet. The reason for this is that the script is data centric and no matter what map you open with this data in, the scripts will run. Remember applets are predominantly used when you want to achieve consistent behavior whenever any map is used.

You will see three scripts in the jScript file (Poles.js):
  • initiateID() – When the map opens (with the points layer in it), the input box appears for you to type in the starting ID.
  • getID() – When the Edit Form is opened, the text box “NAME” is populated with the current ID
  • updateID() – When you press OK on the form the ID has 1 added to it.

Download the sample from the ArcPad Resources Center.


  • At Saturday, March 09, 2013 7:49:00 am, Blogger Unknown said…

    This is great and a very simple way of doing it. A question though, how did you get the symbol to show up in the drop down control for the category field? I can't figure it out! -Ryan

  • At Thursday, March 14, 2013 2:38:00 pm, Blogger Marika said…

    The catergory field uses a SymbologyField control to show a list of symbols and labels.

    This sample point layer has come from a quickproject but you can achieve the same behaviour by defining symbology in ArcMap and checking out your data to an AXF.

    For more information on the SymbologyField control look in the ArcPad customization help:

  • At Tuesday, January 05, 2016 5:06:00 am, Anonymous Anonymous said…

    I have used this script, but I have an issue that I can't quite figure out. When I open the quickproject ArcPad prompts me for the start number like it was intended. The problem I have is that I cannot get the keyboard to pop up. The work around I am doing is to copy the start number first and then paste it in the box. What I would like to figure out is how to get the keyboard to popup as well. Any help would be greatly appreciated.


Post a Comment

<< Home