Hello,
I'm having a problem in saving data. I have set up a 3 page process which can be seen below. Initially, a check in person will put in an ID number of a person entering or leaving the facility and press enter (page 1). This takes the check in person to page 2 where they will select from a pair of radio buttons whether a person is entering or leaving the facility. If entering, the status is 0. If leaving the status is 1. If the status is 0, the ckin variable gets set to the current time. If leaving, the ckout variable gets set to the current time.
The users are already in the db. All I want to do is update the value of either ckin or ckout in their record. The problem I'm having is when I use the DB save action, it creates a new record for that user instead of just updating the ckin or ckout value of the user's record.
[attachment=0]CF.jpg[/attachment]
I'm obviously missing something here.
Thanks for your help.
I'm having a problem in saving data. I have set up a 3 page process which can be seen below. Initially, a check in person will put in an ID number of a person entering or leaving the facility and press enter (page 1). This takes the check in person to page 2 where they will select from a pair of radio buttons whether a person is entering or leaving the facility. If entering, the status is 0. If leaving the status is 1. If the status is 0, the ckin variable gets set to the current time. If leaving, the ckout variable gets set to the current time.
The users are already in the db. All I want to do is update the value of either ckin or ckout in their record. The problem I'm having is when I use the DB save action, it creates a new record for that user instead of just updating the ckin or ckout value of the user's record.
[attachment=0]CF.jpg[/attachment]
I'm obviously missing something here.
Thanks for your help.
Hello chriso0258,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
My form data isn't saving to the database correctly
How do I save form data to a database table?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
My form data isn't saving to the database correctly
How do I save form data to a database table?
P.S: I'm just an automated service😉
Sorry, none of these suggestions help. I'm still getting duplicate records made each time i hit submit.
Hi Chriso,
You must have the value of the record's primary key loaded under a field name matching the primary key field name in order to update the record.
Regards,
Max
You must have the value of the record's primary key loaded under a field name matching the primary key field name in order to update the record.
Regards,
Max
I solved the problem. I didn't bring in the record id (my primary key) when reading the DB. So, I guess without the primary key, even though I had pulled the correct record using the user's personal ID, it didn't recognize that record as the one to save the data to. After I pulled the record id, the data saved to the correct record.
Thanks for your answer Max. I hadn't refreshed my page when I replied so I didn't see your answer until after I submitted.
This topic is locked and no more replies can be posted.