agtjazz Posted February 17, 2012 Posted February 17, 2012 I am trying to create a scheduling database to show a weekly view (Monday-Saturday) of courses booked 7am-10pm. I am trying to get a script to create new records in the Calendar table for Monday 7am-10pm in 5 minute increments. I have 1 record Day Time Monday 7:00:00 I have a script that is adding 300 but it won’t recognize the previous record's time of 7:00:00. I have attached my attempt. Any assistance would greatly be appreciated. scheduling-test.fp7.zip
doughemi Posted February 18, 2012 Posted February 18, 2012 Your set Field line could read Set Field (Calendar::Time; GetNthRecord(Calendar::Time; Get ( RecordNumber )-1) +300] The GetNthRecord command requires a field and a record number, and the Get(RecordNumber)-1 says to get the record just before the current one. You'll have to trap for the first record, and the last record of the day, but this should get you started.
comment Posted February 18, 2012 Posted February 18, 2012 I am not at all convinced creating records in advance is necessary - but if you need it, try it this way? --- P.S. Please update your profile to show version and platform. scheduling-test1.zip
agtjazz Posted February 21, 2012 Author Posted February 21, 2012 Thanks. I think it's necessary to add the time records in advance to show the available time for classes. Is there a better way? PS- I also updated my profile. :)
comment Posted February 22, 2012 Posted February 22, 2012 IMHO, records should be created when there is information for them to store. See also: http://fmforums.com/forum/topic/42617-basic-monthly-calendar-april-06/
Recommended Posts
This topic is 4659 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