It's the nth time i'm having this issue, and i still can't figure out what causes it.
All my lookup are simple, just one or 2 fields and yet they don't work, not always at least. Sometimes they do, sometimes they don't.
i write the usual piece of code:
public void lookup(){
Query q;
QueryBuildDataSource qbds;
SysTableLoolup stl = SysTableLookup::newParameters(TableNuma(LogisticsAddressCounty), this, true);
qbds.addDataSource(tableNum(LogisticsAddressCounty));
qbds.addLookupField(fieldNum(LogisticsAddressCounty, CountyId),true); //field is str
stl.parmQuery(q);
stl.performformLookup();
}
The StringEdit has the property LookupButton set to Always, so there's no excuse; the field type extends str, so no excuse, again.
This piece of code might work for you, it just doesn't work for me.
I have another form with the same code zand it works there, and i have other stringedit controls with similar lookups that just won't work, setting breakpoints is useless since the method doesn't seem to be accessed, closed and reopened the client countless times. Updated the dictionary, the elements, the data and the report. Deteleted auc and kti files. Nothing works.
I don't even know how many hours i spent probing the internet for this problem, no one has experienced this particular issue, my collegues can't help as well
Another thing: one of the other lookups wsasn't working all day, i changed something completely unrelated from the lookup (added some str variable in class declaration i'm not even using) and suddently it started showing the results and the classic icon of the lookup (it still does).
Hope anyone has any idea. i finished them all.