default value from combobox?

I know there must be an answer but I cont find it. V 3.01
I have combobox which allows the user to select a number of values, but 99 times out 100 they will be selecting value 5 (although they see the description ‘patient’).
How can I set 5 as the default so they dont have to select the combobox drop down for most of the entries?

Al.

alb:
I know there must be an answer but I cont find it. V 3.01
I have combobox which allows the user to select a number of values, but 99 times out 100 they will be selecting value 5 (although they see the description ‘patient’).
How can I set 5 as the default so they dont have to select the combobox drop down for most of the entries?

Al.

Set the column to autoenter the value “5” when a new record is created.
You can set it from DATAPROVIDER window or controlling via method.

in case of method the best way to select for example the first value of the valuelist( value|id)?

If you don’t know the ID of that value and it’s always item 5 in the list you can use the following code:

var aValues = application.getValueListArray("valueListName");
columnName = aValues[4];

There are several other functions in the application node that can retrieve valuelist data depending on your need.

Hope this helps.