What should you do prior to using the SETRANGE or SETFILTER functions?

Hi, am new to MS Dynamics NAV.

my question i s What should you do prior to using the SETRANGE or SETFILTER functions?

THank you.

Can you be more clear on your question/requirement?

Thanks for ur replay.

I mean, for example, if we want to find an employees who joined on date1, we can use SETRANGE(Date,date1); and also we can use SETFILTER(Date,’%1’,date1); to get result.

Which function is better or more preferred function in this scenario?

SETRANGE only accepts values - a single value or a range of values(minimum, maximum) of the same type of the field on which the filter will be applied;
SETFILTER accepts a string containing a filter expression

If you can write the syntax with SETRANGE then use SETRANGE if not use SETFILTER…

Thanks, i understood, but my question, if we can achieve SETRANGE functionality in SETFILTER function, then y do we need, SETRANGE?

I will say SETRANGE is a shortcut of SETFILTER where you can set filters in a easy readable format…

Understood, thanks a lot.[:D]

Hi Dileepa,

Did you get an answer to your question? Did it help you? The members and moderators here on DUG use our spare time and help you for free, all we ask in return is that you spent a few seconds to let us know if we helped you solve your problem.

If any of the suggestions helped you solve your question/problem, then please click the “Verify Solution” on the answer that helped you, so that we can see that your problem is now “resolved”. Otherwise let us know how if there is something else you like to know.

Have a nice day! [:)]