Enter this function as a document level script:
function ListEntrySort(cFldName)
{
var oFld = this.getField(cFldName);
var nSelIdx = oFld.currentValueIndices;
if(typeof(nSelIdx)!="number")
nSelIdx = nSelIdx[0];
var cSelName;
var aEntries = [];
var oExports = {};
for(var i=0;i<oFld.numItems;i++)
{
var cEntry = oFld.getItemAt(i,false);
var cExport = oFld.getItemAt(i,true);
aEntries.push(cEntry);
oExports[cEntry] = cExport;
if (i == nSelIdx)
cSelName = cEntry;
}
aEntries.sort();
for(var i=0;i<aEntries.length;i++)
{
if (aEntries[i] == cSelName)
nSelIdx = i;
aEntries[i] = [aEntries[i],oExports[aEntries[i]]];
}
oFld.setItems(aEntries);
oFld.currentValueIndices = nSelIdx;
}
Enter this script as a mouseDOWN action into any combo box field that you want to sort:
ListEntrySort(event.target.name)