Hi
I have below line . I want to setrange < StDate
BLLINE.SETRANGE(BLLine."Product Date",StDate);
Thanks
*This post is locked for comments
Hi
I have below line . I want to setrange < StDate
BLLINE.SETRANGE(BLLine."Product Date",StDate);
Thanks
*This post is locked for comments
You can try below also,
BLLINE.SETRANGE(BLLine."Product Date",0D,CALCDATE('-1D',StDate);
Hey,
You need to use Setfilter instead of Setrange.
That's the only difference between these two, You can give a more specific filter in Setfilter but not in Setrange, like >, <, =, |, 1..n and all.
But dont make it a common habit of using Setfilter every where use only where its utmost needed because from performance perspective its slow.
As Zaid mentioned you need to use SETFILTER in this case but not SETRANGE.
Hi,
Normally the SETRANGE is used when you want the values in a range OR you want the matching values. If you want the values based on comparison, you use the SETFILTER. In your case use the SETFILTER as:
BLLINE.SETFILTER("Product Date",'< %1',StDate);
Thanks