Flagging First Instances
-
- Posts: 2
- Joined: Tue Oct 10, 2017 12:44 pm
Flagging First Instances
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
What do you want to do based on finding the first instance?____Kathleen__R&R Support
-
- Posts: 2
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Flagging First Instances
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
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-