Hi,
First, the intro.
I'm using Alpha 5, and have a set where the primary table is an employee table. The first link table is a join table(joining employeeID, jobID, stationID) that has an auto-increment field called workID and uses the employeeID as the key. There is a link off the work join table to a work time table using the workID as the key.
The idea is that the employee brings up the work form and is able to click on his name in a browse. This links with the work table, and shows all the jobs he is assigned to in an embedded browse on tab 1.
He can then go to tab 2 which has a browse showing him the his work time table for that job. He clicks the "sign in" button, and it puts the current time in the "start time" field. He clicks the "sign out" button and it puts the current time in the "end time" field. He can clock in and out as many times as he wants until he answers a dialog that he's done, and then the status for the job is changed to complete.
Now that the intro is done, here's the question.
The first time the employee goes to the second tab, no records exist in the table for that workID. How do I determine what the current workId is from the parent table so that I can create a new record based on that workID?
After I have a record for that workId, the form will have filtered for the workID, and I can just do a fetch on the first record to see what value is in the workId field. I just don't know how to get the workId for that first record.
Tony
First, the intro.
I'm using Alpha 5, and have a set where the primary table is an employee table. The first link table is a join table(joining employeeID, jobID, stationID) that has an auto-increment field called workID and uses the employeeID as the key. There is a link off the work join table to a work time table using the workID as the key.
The idea is that the employee brings up the work form and is able to click on his name in a browse. This links with the work table, and shows all the jobs he is assigned to in an embedded browse on tab 1.
He can then go to tab 2 which has a browse showing him the his work time table for that job. He clicks the "sign in" button, and it puts the current time in the "start time" field. He clicks the "sign out" button and it puts the current time in the "end time" field. He can clock in and out as many times as he wants until he answers a dialog that he's done, and then the status for the job is changed to complete.
Now that the intro is done, here's the question.
The first time the employee goes to the second tab, no records exist in the table for that workID. How do I determine what the current workId is from the parent table so that I can create a new record based on that workID?
After I have a record for that workId, the form will have filtered for the workID, and I can just do a fetch on the first record to see what value is in the workId field. I just don't know how to get the workId for that first record.
Tony
Comment