You just need to create an array with each term, and increase the count for each arrival. We used the VBScript dictionary object - http://www.4guysfromrolla.com/webtech/102898-1.shtml
The filter looks like this:
Code: Select all
Restrict fields:Pipe-delimited field 1 .. field 1
| [X] Process fields individually
| [X] Exclude delimiter
| [ ] Exclude quotes (if present)
| Delimiter Type: 3
| Custom delimiter:
| [ ] Has Header
|
+--VBScript script Timeout: 10000 milliseconds
'counter for each occurrence of city name
'Our city array
Dim cities
dim c
function processLine(line, EOL)
if cities.Exists(line) then
c = cities.Item(line) + 1
cities.Item(line) = c
else
cities.Add line, "1"
c = 1
end if
processLine = line & " " & c & EOL
end function
sub startJob()
Set cities = CreateObject("Scripting.Dictionary")
end sub
sub endJob()
end sub
function startFile()
startFile = ""
end function
function endFile()
endFile = ""
end function