April 21, 200718 yr I have a table of LineItems sorted by Invoice_ID, and I need to assign an Transaction Number to each LineItem record, as follows: Inv_ID TXN_No etc... C10001 1 C10001 1 C10001 1 C10002 2 C10003 3 C10003 3 In other words, I want TXN_No to increment every time Inv_ID changes. Seems like it should be an easy calc or summary but I can't spot it. Anyone? Thanks, Chap
April 22, 200718 yr Author I'd prefer a technique that is guaranteed to assign numbers sequentially, beginning with 1, regardless of the Inv_ID. I should have illustrated that in my example.
April 22, 200718 yr Are you ok with a scripted process? Create a new Field in your table. # sort by your invoice number Sort Records [Restore;No Dialog] Go to Record/Request/Page [First] Loop Set Variable [$i; Value:Case($inv = Table::InvoiceID ; $i + 1 ; $i)] Set Variable [$inv ; Value:Table::InvoiceID] Set Field [Table::NewField; $i] Go to Record/Requiest/Page [Next; Exit after last] End Loop
Create an account or sign in to comment