Little Effort, Big Savings Add a fill-form-from-history tool to ArcPad in two steps By Mel Yuanhang Meng, DLZ Ohio How the Tool Was Developed For a sanitary sewer improvement project, DLZ Ohio needed to inspect the condition of houses in the study area to evaluate the potential for storm water entering the sanitary sewer system. Initially, condition codes for whole blocks were assigned as project team members drove through neighborhoods in the study area. This process didn't take long but missed lots of details, and ratings were not consistent from one neighborhood to another. Was it possible to collect data for each property without blowing the budget? ArcPad came to the rescue. Switching from a paper to an electronic format immediately freed the team from entering the address and other information that was already available for each house. However, compared with driving through neighborhoods, this was a much slower process. The project budget simply wouldn't cover this expense. However, houses on the same block are very similar and many entries were repeated for every house. This discovery led the team to develop a fill-form-from-history tool that easily cut the time needed for inspecting a block by 50 to 80 percent. Selecting a previously inspected address listed in the History drop-down list populated the values from that address into the current form. For a form with 30 fields, the time savings provided by this tool were significant. Add the Tool to Your Form in Two Steps The fill-form-from-history tool was developed using ArcPad Studio 7 and tested on ArcPad 7. Any ArcPad form developed using an APL file and a JavaScript file can be easily modified to use this tool in just two steps. 1. Add a history combobox control in the form. 2. Reference the JavaScript file that defines a global variable that stores the history and functions that update the history control, read, and save form entries to the history. The form associated with a shapefile is defined by an APL file (layer definition file or *.apl) and a JavaScript file (*.js) that defines the global variables and the functions. An APL file is automatically created when a shapefile is exported using the ArcPad Data Manager extension for ArcGIS Desktop. The APL file is later customized using ArcPad Studio. An APL file is an XML file that defines the symbology data entry forms and references any additional script files. The APL file shares the same base name as the shapefile with an .apl file extension. Table 1 explains the control flow and event names for the fill-form-from-history tool. As a shapefile is loaded into ArcPad, the global variables and functions defined in the JavaScript file are automatically loaded. The function is called when the corresponding event is triggered. The fill-form-from-history tool Event (Event name) Add shapefile into ArcPad (NA) Form is on load (onload) Form is closed and saved (onok) History control on select change (onselchange) Action (Function name) Loading global variables (NA) Populate the history control with previous entries (draw_history) Saving the entry into the global history variable (save_history) Populate the form with values for the selected entry (fill_form) The parcel APL file ArcUser Summer 2009 Table 1: Control flow of fill-form-from-history tool www.esri.com