From d/b alpha, I open d/b beta which has 690 records. The procedure in alpha runs this code to summarise the records in beta and assign a value to the Kounter field in each summary record:
field Kounter fill ""
field SourcePIC groupup
field TransferDate groupup by day
field RFID count
field SourcePIC propagate
field VendorName propagate
field RFID unpropagate
select RFID > ""
removeunselected
outlinelevel 1
field Kounter
let I = 1
loop
Kounter = I
I = I + 1
downrecord
until info("stopped")
When it comes to assigning values in the Kounter field, the display reverts to all records without any summaries and assigns 690 values.
If I put the identical code in a procedure in the beta d/b, it does what I want, which is to assign values only to the summary records. I’m using a loop to assign the values because I tried using
field Kounter sequence 1,1
but that just put the value 1 into every summary record.
Why is this happening and how do I get around it?