Script step to go to next unique record
I've somehow achieved my lookup on sub summary values - it's working and I'm not touching it!!
The final thing I need to do is instruct FM to move through the data table which is being sorted and summarised so that it can get to the next distinct record. The reason a simple Goto Next Record won't work is because the data table has many rows of data per customer, per year.
What I need to do is to change layout, check the customer ID, is it the same as a variable I already have set? If yes, goto next record, if no, return the sub summary figure.
That's the context. The data table looks something like this, just on a bigger scale:
CustomerID | Value
1010 | 10,000
1010 | 15,000
1010 | 5,000
1020 | 15,000
1020 | 25,000
So, after FM has summarised customer 1010 and thrown the result of 30,000 elsewhere, it needs to go back to this table, check the next line, if it's 1010, goto the next line, if it's 1020, perform a task.
That's where I'm struggling because if I understand correctly, the IF statement needs a boolean response rather that a 'go off and do something else' response.
Sorry if this seems garbled somewhat, this is pretty much the final piece on this task (I HOPE!!), a task which has defied logic throughout :)