indexlookup (OpenInsight 64-bit)
At 12 JUL 2023 07:03:51PM Gerry Van Niekerk wrote:
OI10
There is a procedure Indexlookup that gets used to search various indexed items
To find an item you have to use the dropdown when the form is displayed, then type something and it will move down.
Is there a way/setting the data can be displayed when you start typing.
Also any way to make it display in the MDI Frame?
Thanks
Gerry
At 13 JUL 2023 08:10AM Andrew McAuley wrote:
INDEXLOOKUP is what it is unfortunately. You CAN specify your own popup to override the system built one, and you can specify that the popup should be multiselect, but that's about it.
If you call Index Lookup directly, I believe you could change the parent to be the MDI Frame rather than the current window but I have never tried it so don't know if there are ramifications.
You might be better off building your own window, there's not a lot going on in the routine.
World leaders in all things RevSoft
At 13 JUL 2023 09:42AM bob carten wrote:
FWIW,
I put a function in OI10 alled RTI_QUERYGRID. It mimics indexlookup, but allows you to specify non-indexed fields as well. I believe we ship the source for the window so that you can save a copy in your app and modify the look. The functionality is in the commuter module, which we don't ship. Currently it does not support passing in a list of values per field, but I could add that if you think the window is useful.
function RTI_QUERYGRID(ownerwindow, table, SearchFields, displayedfields, mode, popupname, by_clause)
Variation of INDEXLOOKUP which works on non-indexed columns too, supports sorting
ownerwindow = parent window
table = data table
searchInfo = fields for the lookup, vm/svm delimited structure colname [ svm label svm conv svm operators svm optionlist]
colname = name of search column, required
heading = label , optional
conve = output conversion, optional
operators = svm delimited list of comparison operators, optional
displayedfields = fields to display in popup, optional, defaults to null. NOTE: leave null to return all keys from search
mode =single / multi, optional, defaults to single, only aplies when you supply popup or dispkayfields
popupname = predefined popup to use in line of displayfields, optional, defaults to null
by_clause = sort clause for the popup, e.g BY LNAME BY FNAME, optional, defaults to null* Rti_querygrid example Declare Function rti_querygrid atWindow= CtrlEntId[1,'.'] id = rti_querygrid(atWindow| ,'PERSON' | ,'CITY':@vm:'FNAME':@vm:'LNAME':@vm:'ZIP' |\ ,'CITY':@vm:'FNAME':@vm:'LNAME':@vm:'ZIP' | ,'SINGLE' | ) If id Then unused = Set_Property( atWindow:'.EF_IDNO','DEFPROP', id ) call send_event(atWindow:'.EF_IDNO', 'LOSTFOCUS') end
At 13 JUL 2023 07:08PM Gerry Van Niekerk wrote:
Thanks Bob,
just realised I use it with QBF
Will give it a go and let you know..
Gerry