Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Assign serial number for group of records

Featured Replies

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

How about:

GetAsNumber ( Right ( Inv_ID ; 4 ) ) ?

  • 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.

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

  • Author

Yeah, that'll do. Thanks!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.