>Hi All,
>
>My view is table buffered. and I have to check duplicates in it. I wana to check duplicates on cCode + dDate. In one of my other form where i am checking duplicate on only one field I was using
>
>Copy all to array for field... and then
>for i = 1 to alen(array)
>scan the array
>endfor
>
>but here i wana to check duplicates on two fields. code + date. can anyone give me idea please?
>
>Thanks in advance
>Mark
If it's buffered and you can not use select SQL, you can do:
go top
lcCombination = code+dtos(date)
lnDupl=0
scan
if code+dtos(date) = m.lcCombination
lnDupl = m.lnDupl+1
if m.lnDupl>1
endif
else
lcCombination = code+dtos(date)
lnDupl = 1
endif
endscan
This code from the top of my head and not tested.
If it's not broken, fix it until it is.
My Blog