Find Function

divyardivyar Member Posts: 17
edited 2015-03-03 in NAV Three Tier
What is the use of Find('=>') ,Find('<='),Find('=') in nav 2013 r2. If i set value for the primary key,use any of the mentioned Find function and use repeat until with them,records are not getting filtered properly.

Test table has 4 records.No is the primary key.
No values-1,3,5,7


if test.FIND('<=') then
UNTIL test.NEXT=0;

output: 1,3,5,7

<= to search for a record that is less than or equal to the key values
Expected output: 1,3


  • Options
    kinekine Member Posts: 12,562
    1) Depends on sorting order (it means on current key). If sorted by anything other, it has no sense.
    2) FIND is never filtering. It is just finding the record. In your case, first record having No. = 3, if not exists, than previous one. If you want to filter, you need to use SETRANGE or SETFILTER.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.