Hoping someone will see what I’m doing wrong here. I am having a fundamental problem with FTSearch where the search appears to work (returns expected COUNT = 1 in the collection), when I do a GetFirstDocument, a document is returned but has no values in any of the items. I have tried the FTSearch from the client GUI and it returns the expected form (which DOES have value in many of the ITEMS. Code below - any suggestions appreciated.
’ set up code
Set db_forecast = session.getDatabase(“”,str_forecast_name,str_forecast_name)
If Not db_forecast.IsOpen Then
Messagebox("Could not open" & str_forecast_name)
Goto ExitSub
End If
Call db_forecast.Updateftindex(True)
’ ftsearch code
Set dc_forecast = db_forecast.FTSearch(Form = “Forecast” & FWorkNum = str_work_number,0)
Set doc_forecast = dc_forecast.Getfirstdocument()
num_docs = dc_forecast.Count
*** RESULT - num_docs = 1 (as expected), doc_forecast is NOT Nothing - designer variable view shows ITEMS in doc_forecast but all values are null (the actual form returned in the client GUI does, in fact, have values)