Page 1 of 1

Flagging First Instances

Posted: Thu Sep 25, 2003 8:08 am
by James_Oakley_(Guest)
R&R version 9 xbase____I^m working with a simple one table database of invoice records. Is it possible to create a calculated field that will flag the first (and only the first) instance where a customer^s number appears in a field? ____I have no problem writing an IIF statement that will generate true if the customer number matches the one I^m looking for, but I can^t seem to be able to write an IIF statement where, once it does generate a true condition, it will stop looking.

=> RE: Flagging First Instances

Posted: Thu Sep 25, 2003 12:40 pm
by kfleming
What do you want to do based on finding the first instance?____Kathleen__R&R Support

=> RE: Flagging First Instances

Posted: Sat Sep 27, 2003 3:11 pm
by James_Oakley_(Guest)
Once I am able to return a value of true for the first occurance, I will then query on that field to separate the first time each customer^s name appears from all the rest.____We are looking to build a report that will tell us the first time a customer did business with us.

==> RE: Flagging First Instances

Posted: Sat Sep 27, 2003 9:59 pm
by pdempsey
Try grouping on the customer ID and sorting on the Customer ID + transaction date (or the field the system uses to order the transactions sequentially). Use a group header as your print line so that only the first record of the group will print and don^t print any record level lines.____This is off the top of my head, but it^s the first thing I^d try.____-Pat-