My main table is Work_Order_Table. Customers call us for work to be done, and we create a record in this table to reflect that. After it is created, we assign a technician to it through Tech_Assign dropdown field. This technician updates the record with two date fields - a Measure Date and an Install Date. So, each record in the Work_Order_Table has 2 date fields.
I am trying to display these date fields separately on a Calendar DataPage. The problem is that you can only filter by one date field per record, so I cannot plot both dates on their respective day.
To fix this, I have created a new table called Tech_Schedule_Table. The fields are Date_ID (autonumber), Event_Type (this will be either measure or install), Date (the actual date of the field), and Technician (the value of Tech_Assigned from Work_Order_Table). I am trying to create a trigger that will split these two dates into their own record on the Tech_Schedule_Table so that I can display them both correctly.
The problem I have run into... The records in Work_Order_Table have some unrelated fields that are updated multiple times a day. I wouldn't want the Install and Measure Date fields to add to the Tech_Schedule table every time that parent record is updated. Secondly, if the Technician needs to change one of the measure/install dates on the Work Order record, I don't want the old dates to show up as well - only the updated ones.
Here is what it looks like without splitting the date fields into their own record. Notice that the Install Date is on the wrong date.
This is the new table structure. If I need to add more fields, please let me know.
Here is the trigger I am working on. Need to enhance this so it can replace old dates with new ones and not insert again on unrelated updates to the parent record.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
kpcollier
Howdy.
My main table is Work_Order_Table. Customers call us for work to be done, and we create a record in this table to reflect that. After it is created, we assign a technician to it through Tech_Assign dropdown field. This technician updates the record with two date fields - a Measure Date and an Install Date. So, each record in the Work_Order_Table has 2 date fields.
I am trying to display these date fields separately on a Calendar DataPage. The problem is that you can only filter by one date field per record, so I cannot plot both dates on their respective day.
To fix this, I have created a new table called Tech_Schedule_Table. The fields are Date_ID (autonumber), Event_Type (this will be either measure or install), Date (the actual date of the field), and Technician (the value of Tech_Assigned from Work_Order_Table). I am trying to create a trigger that will split these two dates into their own record on the Tech_Schedule_Table so that I can display them both correctly.
The problem I have run into... The records in Work_Order_Table have some unrelated fields that are updated multiple times a day. I wouldn't want the Install and Measure Date fields to add to the Tech_Schedule table every time that parent record is updated. Secondly, if the Technician needs to change one of the measure/install dates on the Work Order record, I don't want the old dates to show up as well - only the updated ones.
Here is what it looks like without splitting the date fields into their own record. Notice that the Install Date is on the wrong date.
This is the new table structure. If I need to add more fields, please let me know.
Here is the trigger I am working on. Need to enhance this so it can replace old dates with new ones and not insert again on unrelated updates to the parent record.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.