Hi
I have ID No field on a form. My code generates ID no after saving. Code checks the previous saved ID no in the view and accordingly increment the ID no value. First I am searching for current year document in view i.e. 2008 and then code has to filter documents out of current year filtered documents. Now I am not able to understand how can getalldocumentbykey can be used for both “Current Year” and “Branch Location”. I have used FTsearch method but of no use. Code below is:
Set loView=lodb.getview(“Counter”)
Call loView.Refresh
branchLoc=louidoc.Fieldgettext(“Branch_Loc”)
curr_year=louidoc.FieldGetText(“curr_year”)
Set loDocColl=loView.GetAllDocumentsByKey(curr_year, True)
If loDocColl.Count > 0 Then
Call loDocColl.FTSearch(branchLoc, 0)
If loDocColl.count=0 Then
Set loDoc=loDocColl.GetfirstDocument
msgbox loDoc.ID_no(0)
end if
end if
But FTSearch shows document with relevance. So getfirstdocument and getlastdocument fails.
Please suggest some other method as I need to first filter docs on Current Year basis and then from that filtered documents I need to filter more on Branch Location.
Please help. Thanks