0

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.

2
  • When you say "various scripts" what do you mean? You should be able to set a default value using the an event like Page Load or something similar. It has been a while since I have looked at ArcPad, but they usually have some loading events where you can target a specific field and assign it a specific value.
    – Branco
    Apr 22 '15 at 12:18
  • @Branco I tried a javascript script from version 8 but it didnt work
    – Jampot2000
    Apr 22 '15 at 19:12
1

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: 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:

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.

0

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"/>
1
  • I tried that without any success. My original entry uses values entered within ArcPAD Studio and doesnt refer to an external dbf the combobox comes up with an script error <COMBOBOX name="Priority work" x="36" y="2" width="91" height="12" defaultvalue="" listtable="" listvaluefield="" listtextfield="" tooltip="" tabstop="true" border="true" required="true" sort="false" field="PRIORITYWK">
    – Jampot2000
    Apr 22 '15 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.