Within the scripting language, there are two functions that appear to do the same thing. These are the
Peek() functions. However, there is a subtle difference between the two when it comes to the script, and it is not just the number of parameters.
if(Previous([Manufacturer No])=[Manufacturer No],1) as SameManuf if(Peek('Manufacturer No')=[Manufacturer No],1) as SameManuf
Both check to see if the previous record had the same
Manufacturer No value (as long as data is sorted in this field). However, if we want to make a counter field, we can only use the
Peek() function as the
Previous() function must be used to refer to a field that actually exists in the source data.
Take a look at this statement:
if(Peek('Manufacturer No')=[Manufacturer No], Peek('ManufCounter...