Last occurrence of record in IF statement

Discussion created by guit4eva on Jul 31, 2017
Latest reply on Jul 31, 2017 by guit4eva

Hey guys,


I'm stumped on this one. I have a table such as:


Item   | Color | Qty

Apple | Green | 30

Apple | Green | 20

Apple | Green | 50


I'm trying to build a loop that does the following:


1) If Apple exists and quantity exists, go to the next record. Repeat until the last occurrence of Apple, then create a new record. I know how to create a loop if there is just one occurrence of the record, but checking multiple occurrences has really made me confused.


Thanks so much in advance!