Using GETRANGEMAX

johndimjohndim Member Posts: 17
Hi everybody
I have a record variable for "Purchase Line" table and i want to find
specific records for an item.
I use setrange to find all records for that item but my problem is when i get more than one record in return. I want to get the record with the biggest value in the "Expected Receipt Date" field.
I tried GETRANGEMAX with SETFILTER like this :

EVALUATE(jd,'311206');
recPurchaseLine.SETFILTER(recPurchaseLine."Expected Receipt Date",'%1..%2',0D,jd);
myDate := recPurchaseLine.GETRANGEMAX(recPurchaseLine."Expected Receipt Date");

But in the end the value of myDate variable is 31/12/06 (which is the upper limit of my filter) and not the biggest value of my record.

What is wrong ... please help ](*,) ](*,) ](*,)

Comments

Sign In or Register to comment.