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.

RecID as a field name

Featured Replies

I have a database here that powers an online store. Some weird things are happening. (duplicate order numbers for different customers, etc.)

One of the fields is named RecID and is defined as "Status(CurrentRecordID)".

I seem to remember reading that this is a very bad idea. But I forget why. Why?

CurrentRecordID should be OK. CurrentRecordNumber is the one to watch, because it is the number of the record in the current found set.

Are the Order Numbers auto-generated by FM?

All the best.

Garry

  • Author

This is how the order numbers seem to be generated.

When a user enters the store, a new record in the Orders database is created and right then a token is set to the CurrentRecID for that record (it may become an order later on depending if the person buys something).

This token follows the user through the store as they browse and when they select items, it pushes this token value in as "order ID" for each item in the ORDEREDITEMS database. Then if they decide to buy all the things in their cart, they submit order and then the field ORDER ID in the ORDERS database gets filled with this token value.

(ORDERS is the database with the field RECID). Now the Order can relate to its ordered items.

I had three orders in the past 3 days all come in with the same order number. I do not have three unique records in the database. The earliest two have disappeared.

Luckily I get an email generated at order submittal time with the order info or I would never know about the first two orders!

Any ideas?

What happens to the "New Record" when an order is abandoned?

Looks like the RecID is incorrect when the order is checked-out (-edit) and the wrong -RecID is being used!!!

What does the final form look like? Is the -recid passed accurately all of the way through?

Hmm.. got the thinking-cap on.

Good Luck.

Garry

The best way to troubleshoot this is to put the [fmp-currentrecid] and [fmp-currenttoken] tags on each key page in the website, and to track an order. you can best see when things go wrong this way. i have had this issue before, when i am tracking related DBs, which end up generating different recIDs, and blahblahblah (non-related info). anyways, try putting both these tags on, and see the step where the token gets set incorrectly. it could be as simple as one page missing the <input....value=[fmp-currenttoken]> tag...

Bevin

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.