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

Incrementing serial number in a simple accountancy database

Featured Replies

  • Newbies

I am trying to build a simple database to keep account of bank transactions.

I have two tables: "TTransactions" and "TRegister"

From the table "TRegister" I plan to create new records in "TTransactions".

I have set up a relation between the two that seemingly works fine.

I have created a portal in "TRegister" for creating records in "TTransactions". This portal shows the following flds in this order:

"Bnr", "Date", "Accountnr", "Txt", "Debet", "Kredit" (left to right in the portal)

The fld "Bnr" in "TTransactions" creates a serial number for each bill (document) to be registered (on creation).

Then I have a calculation fld called "Balance" in "TRegister" that calculates the balance between the two fields "debet" and "kredit" in the portal related to "TTransaction".

On creation of new record in "TTransactions" I want to keep fld "Bnr" the same if fld "Balance" is not 0-zero. If the result is 0, then the serial nr of fld "Bnr" should increment by 1.

How can I get this result on committing the last fld "kredit" of the last record in the portal?

I would very much appreciate the help from some expert out there! Thank you!

I would strongly not recommend that you do not try and go down this path. Each record should have a serial key as a unique id.

  • Author
  • Newbies

Thank you for your trouble trying to understand my problem!

May be you are quite right. I am sorry I might not have made myself quite clear.

1. Each transaction has individual serial number. The fld "Bnr" is another reference number to each document registered. When registering one document, you might have to have for example 1 debet transaction and occasionally several kredit transactions, i.e. not always only 1 debet and 1 kredit. Therefore two serial or reference numbers are needed.

2. One important concern is how to make things happen when committing data in a field, for example when leaving the last field in the last portal row (the fld "Transactions::Kredit")

I think this must be possible, but I have not found any way yet...

May be you have some more advice?

;)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.