Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Solution 1

Status
Not open for further replies.

tcoyle777

Programmer
May 8, 2007
34
0
0
US
Anyone made a daily calendar, weekly calendar, and Daily Calendar? I have a projects page that I need to populate bookings to a calendar and need some help setting it up.

 
I looked at those. My problem is that I have a 6 room facility that needs a calendar. Do you feel its easier to just modify theirs then creating one from scratch?

 
I don't kow your level in FileMaker.

If you feel you can do it on your own from scratch, just go.

I made one years ago, for an exibition center with 28 different 'rooms', with a control system for possible double booking.

I recently rebuilt it FM8, and it's much simpler now than 10 years back.

On the other hand, if you never did something like that, it could be easier to take the Seedcode example (or every other freeand open example) and modify it to your needs.
Once you have the grab of the concept, you can start building your own custom made application.
 
Jean,

I am fairly new at programing with FileMaker Pro, we have used FileMaker 3 for about 10 years now at my work. I am building a new database and have a pretty good understanding of FM8 so far. My problem seems to be setting up the Calendar Calculations for a monthly calendar and weekly calendar. I am not sure what the best means to set them up are. Any suggestions?

thanks
 
I would take a look at


Fill in "calendar", check "All" and hit Find.

One file will give you the real basic concept: "Calendar Conundrum#.

The "Calendar Solution" file will give you an application to take to pieces and look behind the screens.

With those little tools you will be up and running in no time.
 
Jean,

thanks this will get me going!!. Your the best.
 
OK,

I tried that man's step by step calendar and it started out ok and then went downhill fast!!! He did a good job detailing the scripts but not how really anything else works or is set up. Does anyone have a Calendar solution I can look at to get to populate the correct Days to Months for this year. I think I can understand it better this way.

thanks

Tim
 
Calendar applications are not thát easy to build.
I don't think a developer will 'give' the techniques away (even I make a living coding applications)

Most of the example files you can find are not free, or limited in time as demo.
And most don't let you peek behind the screens.

The closest I can get you is to browse the JMO site for calendar files.
Look for 'Basic Monthly Calendar' and there are others, both in FM7/8 or FM6.
The FM6 versions can be converted to FM8.

A basic requirement to build a calendar system is a good working-knowledge of relational design.
And that is not something I can explain in a (or several) post(s) on a forum.

I suggest that you take a close look to the relational techniques, make sure to understand them (not only copy and use). That will give the lever to go on your own to build sound relational applications.

But, if you're stuck with a specific (not a wide general) problem, the folks on the forum are there.

Respectfully
 
What is the JMO Site?
Thanks for your help. I know iam asking a lot. I just having a problem understanding how filemaker relates dates and how to then use them in calculations. I was hoping there was some sort of training file on making a calendar, but I can not find one.
 
JMO - John Mark Osborn -
And no, you don-t ask a lot, we are just not able to give you a full correct answer.
To help we have to go into technical details that you will not understand....before you have a throughout understanding of relational techniques.
And a calendar is 90% relationships....

For a training file, the one you already have is the only one I know that goes in such details, but indeed, not on the relational level. Or at least this is a free one. There are a lot out there for (too much) money, but the developers like to make a living....

Look for some sample files at the site I mentioned above. Some are open,where you can access the fielddefinitions and relationship diagram.

You could buy a book (Special Edition Using FileMaker 8 is not bad, together with the FileMaker 8 Functions and Scripts- Desktop Reference).

Those two will be well worth the money to keep you going.
 
I got those books and read them. I have a working knowledge of the relationships. I guess for me the calendar is something that I am being slow on. Its not as straight forward as a unique id relationship. I guess I have more studying to do.

thanks again. I do understand the need to make money for developers. Someday maybe I will have enough skills to do some.

 
Ok,

I got my calendar working just fine and all makes relative sense. I have a question on getting my Project Names to show up in the correct booked room. I have a table called Projects that stores information about the session. The relative info is Studio,Date Start and Date End. By relating the Date Start and Date End from the projects page and putting the project field on the calendar I get the project name to show up. What is the best way to relate my projects, rooms and dates to show the correct information on each day in each room. I was thinking i need a join table, but was wondering if just a table occurence of the Projects table would do. I tried that but it did not seem to work correct, unless I am missing something.
 
A join table is the way to go.

It will give you the flexibility you want/need and it will make your application dynamic.

Furthermore, with jointables, the maintenance of the data and the application as a whole will be much easier.
 
Any advice or tips on the best script to use to assign a booking to a particular room and to do a double booking check?
 
Not the easiest part, not knowing your setup.
And it is based on a deep understanding of relationships.

Basicaly you need a few scripts.
1. To add bookings (is adding a record)

Allow User Abort (Off)
Go to layout (yourBookingLayout)
New Record/Request
SetField (yourDateStart;yourCalendarRelatioship::date)
SetField (yourDateEnd;yourCalendarRelatioship::date)
Pause/Resume Script (Indefinitely)
#Alert the user for potential date/time conflicts
Perform Script (CheckForConflicts)

2. CheckForConflicts
Allow User Abort (Off)
Go to Field ()
# Count the number of related records using your Serial field. Any count > 0 has a date/time comflict
If(
Count(eventConflict::Serial) > 0
Show Custom Dialog ( Your message here)
with 2 buttons, one for 'Fix' and 1 for OK
# If the user chooses to 'Fix' the records, pause the script and run it again before continuing
If(
Get(LastMessageChoice) = 1
Pause/Resume Script (Indefinitely)
Perform Script CheckForConflicts
End If
End If

This system uses 2 recursive custom functions to generate a date list for daes between dateStart and dateEnd, and an other one to generate the time between timeStart and timeEnd.
The generated lists are ¶ separated and will act as multiKey in your relatioship.

The date CF can be something along these lines:
Case(
EndDate > StartDate;
StartDate & "¶" & DateRange (StartDate + 1; EndDate);
StartDate
)
Where startDate and Enddate are parameters.

The Time CF goes along the same structure.

 
I must be missing something, the set field command is not working correctly. When it runs it makes my start date 1/1/0001 not the date that it should be getting. Any ideas? I have tried the set field script before and I must be missing something because I can not get it to work properly. I have looked at the books I have and seem to have things set right.
 
Your dateStart is a manually entered value in the Booking table.

The script will set the date field through the relationship.

Check your CalendarRelationship, check the table occurence you use for this relationship and see if the set field does the job in the right perspective, related to the used relationship.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top