Then find (Ctrl+F) is used in form, OnFindRecord called with ‘=><’ parameter. WHERE IS LOGIC ? Such stuppid bugs makes, this triger USELESS !!!
From the Help… Tells the system how to perform the search. The system searches through the table until either it finds the record or there are no more records. Each character in this string can be present only once. You can combine the ‘=’, ‘<’ and ‘>’ characters. This… Tells the system to search for… ‘=’ A record that equals the key values (default) ‘>’ A record that is larger than the key values ‘<’ A record that is less the key values ‘+’ The last record in the table (’+’ can only be used alone) ‘-’ The first record in the table (’-’ can only be used alone) End of Help… Look at codeunit 395 for a good example! Finds a record based on values you put in the primary key! So ‘=><’ means first find a record that matches if not one less than if not one greater than. FindDate(SearchString : Text;VAR Calendar : Record Date;PeriodType : ‘Day,Week,Month,Quarter,Year,Accounting Period’) : Boolean Calendar.SETRANGE(“Period Type”,PeriodType); Calendar.“Period Type” := PeriodType; IF Calendar.“Period Start” = 0D THEN Calendar.“Period Start” := WORKDATE; IF SearchString IN [’’,’=><’] THEN SearchString := ‘=<>’; IF PeriodType = PeriodType::“Accounting Period” THEN BEGIN SetAccountingPeriodFilter(Calendar); Found := AccountingPeriod.FIND(SearchString); SearchString := ‘=<>’; Finds Equal First, Less than if not Equal, greater than if not Equal or less than. There is the Logic! David Cox MindSource (UK) Limited Navision Solutions Partner Email: firstname.lastname@example.org Web: www.mindsource.co.uk Edited by - David Cox on 2001 Mar 27 19:54:52
David, you don’t understand me. I was talking about search button logics, not about find func. Sorry, for my poor english. Lets look deeper. So I’m searching on description field in list form. Search window sets Rec to found rec. Calls OnFindRecord(’=><’); But I’m looked for specific Rec !!! Now tell me how recognize who called OnFIndRecord triger: OpenForm, FindLast, FindFirst or Search ? What for I need this. I have form on temporary table. It shows 200 recs instead 3000 (let it be inventory). So OnOpen form I create temp table from inventory by adding only 200 recs to temp table. Form Rec is Inventory. How search them ? I can Overide Ctrl+F, but button I can’t. OK, I can tell to customer that inposible. But how make the window with behaviour like search window ???
Strange enough, but Navision doesn’t support the triggers OnFindRecord() and OnNextRecord() when using the “search” form (Ctrl-F). Not even i Navision Solutions 3.0 is this fixed yet Soren Nielsen, moderator Integration/Developer NOLUG Edited by - SNielsen on 2001 Mar 28 10:55:22