0

Difference between SETRANGE and SETFILTER

Posted by Nantharupan on 12:15 PM in , , ,
We often face situation to filter record in NAV. There are two function can be used most of the time interchangeable for simple filters. However there might be performance consequences. 

  • SETFILTER()
       It can be assign a filter on a record to a filed we specify. It often used to do the complex filtering. 

  • SETRANGE()
       It is a simple filter, where single value or single range can be set on a field. 

SETRANGE give us a quick way to set up the Filer. 

CustomerRec.SETRANGE("No.", 100, 200); 

Above line simple filter the customer record with customer number from 100 to 200. 

The same functionality can be achieved by using SETFILTER() as follows

CustomerRec.SETFILTER("No.", '>=100&<=200');

We can see the difference. When using the SETFILTER() we should construct the filter statement. However we can not achieve complex filters using SETRANGE().

It is an incomplete post.....





0 Comments

Post a Comment

Popular posts

Copyright © 2009 On the way All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.