dmcwhirt Posted October 23, 2002 Posted October 23, 2002 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?
Garry Claridge Posted October 23, 2002 Posted October 23, 2002 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
dmcwhirt Posted October 23, 2002 Author Posted October 23, 2002 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?
Garry Claridge Posted October 24, 2002 Posted October 24, 2002 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
CyberSport Posted October 24, 2002 Posted October 24, 2002 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
Recommended Posts
This topic is 8136 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 accountSign in
Already have an account? Sign in here.
Sign In Now