Resolved Counting Value Occurrence In Returned Records

JoseKreif

Member
I'm writing a small program to automate a certain task. I have the user lookup records with certain detains and I populate a CSV spreadsheet with all possible values.

The user has to look in this spread sheet for the odd value in on of the fields.

I've taken two fields out of the bunch to show what I'm working with. The field on the left contains a number, this number should exist twice. So I am looking for the one that is odd

I've color coded everything to show that 1 record in her doesnt have the other part to it.



91894412 [-----------] -214.22
91894412 [-----------] 214.22
93077734 [-----------] -214.22
93077734 [-----------] 214.22
93077725 [-----------] -214.22
93077729 [-----------] -214.22
93077730 [-----------] 214.22
93077725 [-----------] 214.22
93077728 [-----------] -214.22 <---- ODD ONE!
93077729 [-----------] 214.22
93077730 [-----------] -214.22


What I want to do is add logic in my foreach, something that can work like

Code:
if count-of[docNum] > 1 then next.

I can probably find a way to build some code to count, but I was wondering if something like this existed. I thought there was, using a break by.


*** DISCLAIMER, The value on the left if not a key, and does not need to be unique in this table***
 

JoseKreif

Member
Solve.

I was close.

Using break by I completed this

Code:
if last-of(document-num) and
   first-of(document-num) then
     /* DO THIS */
 
Top