Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6485 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

This topic is 6485 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.