I am using custom lookup code on a form string control. It works great, unless there is any text in the field. Then, it always returns blank unless what is entered in the field is an exact match for a value in the list. My preference would be for the text in the field to serve as a startsWith filter (and already addressed when I make the value list), but at this point, I would be happy with even the full list appearing, instead of blanks.
public static client void lookupList(FormStringControl _formStringControl, List _valueList)
{
ListIterator valueIterator;
myLookupTempTable tempLookupTable;
SysTableLookup sysTableLookup;
if (_formStringControl && _valueList && _valueList.typeId() == Types::String)
{
valueIterator = new ListIterator (_valueList);
while (valueIterator.more())
{
tempLookupTable.Value = valueIterator.value();
tempLookupTable.insert();
valueIterator.next();
}
sysTableLookup = SysTableLookup::newParameters(tableNum(myLookupTempTable), _formStringControl);
sysTableLookup.addLookupfield(fieldNum(myLookupTempTable, Value), true);
sysTableLookup.parmTmpBuffer(tempLookupTable);
sysTableLookup.performFormLookup();
//dispose of the temp table
tempLookupTable = null;
}
}