I am trying to set a default value for a combobox to speed a highway survey. The default value doesn't work have tried various scripts but I can't get them to work.
From the ArcPad Studio 10.x, navigate within the collection form (in the .APL) to the ComboBox you want to assign the default value to. When created, each ComboBox will have defaultvalue added as a property already.
Picture of defaultvalue:
Copy the value you want to be the default from the ComboBox ListItem, double-click the defaultvalue property, paste the value into the box, surround the value with double quotation marks, and you will set the defaultvalue property. (This is for a text field).
Picture of defaultvalue set:
When the operator creates a feature, the ComboBox will fill automatically with the defaultvalue and the operator can change to another value if they want.
The reason you must match the value to a ListItem is to match the value type in the field (mine was string to string, hence the quotation marks). It seems silly, but I got it to work in this fashion on a Trimble Geo 7X using ArcPad Studio 10.2 R1 Build 23.
Default value for a form control can be defined within the .apl (or via the GUI ArcPad Studio collection form):
<COMBOBOX name="cboclear" x="45" y="125" width="125" height="100" defaultvalue="mydefaultValue" listtable="LUT_myTable.dbf" listvaluefield="STRG" listtextfield="STRG" tooltip="" tabstop="true" border="false" required="true" sip="false" limittolist="false" sort="false" field="myField"/>