We do a lot of production scheduling. I am in the process of modifying CCCalendar so that a user can prioritize tasks for the day on the Daily O-- layout and enter a time duration for that task and, when a "recalculated" button is clicked on the layout, the start and end times will be re-calculated. In my recalculate script I am going to a layout that I created called Appointments - Daily View based on Calendar Daily TO, read through the records which are from Appointments Daily (using the Calendar Daily TO seems to be the only way I can see the records from AppointmentsDaily, not sure why?) , calculate the new start/end times and in debug everything looks fine until the Daily O-- layout is redisplayed and I notice that the times haven't changed. I know that part of my problem is getting used to FM7. I don't understand why the only way I can see appt records is through Calendar Daily TO. If I look at AppointmentsDaily I see 0 records. Any help would be greatly appreciated.
Thanks!
Can't update start/end times in script
4 posts
• Page 1 of 1
Posts: 7
Joined: Fri Dec 03, 2004 8:41 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi. It sounds like you want to move from the daily view to a found set of appointments for that day. If that is the case you'll want to end up on a layout based on the appointments (CCCalAppts) table: the Search Appointments layout would probably work well for this.
To get the found set you want, you'll use a GoToRelatedRecord command from CalenndarDaily, using the found set from AppointmentsDaily, and landing on Search Appointments. This script step would look like: Go to Related Record [ From table: "AppointmentsDaily"; Using layout: "Search Appointments" (AppointmentsDaily) ] [ Show only related records ] That should put you in the found set of appointments where you can work your magic. Best, John John Sindelar
SeedCode |
Posts: 7
Joined: Fri Dec 03, 2004 8:41 am |
Before your reply I had read through the portal and did my update that way. Is the Go To Related Record script step better than updating through the portal?
I used the following GTRR which worked fine: Go to Related Record [ From table: "AppointmentsDaily"; Using layout: "All Fields" (AppointmentsDaily) ] [ Show only related records ] Thanks for your help! |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
No, "portal walking" is fine. One nice thing about doing it that way is that you only have one place to maintain the sort order for your items. If you go to a list you'll have to resort them if their start/end times depend on their relative priority.
Sure. As long as your destination layout is based on Appointments Daily, you're all set. Glad its working for you. John Sindelar
SeedCode |
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests