April 17, 200817 yr I am very new to filemaker.A complete beginner.I have a table that has a field named date and a field named #of nights. This is associated with room bookings. I need to create a calculation that will generate the actual dates associated with the number of nights. Example: Start Date: 01/01/08 Number of nights: 5 I want to generate the dates as follows in separate rows: Calc Dates: 01/01/08 01/02/08 01/03/08 01/04/08 01/05/08 How can I do this or what formula can I use to look up the start date and multiply the nights?
April 17, 200817 yr There are several ways to do this - so it would be helpful to know why you need it, and how you're going to use it. If by "separate rows" you mean separate RECORDS, you will need a script - a calculation cannot create records.
April 18, 200817 yr Author I need to obtain the total amount of rooms booked by date. All I have are the start date and number of nights and those are associated with individual people. I think I need to have them presented as separate records. Im not sure syntax wise how I write this script to do the date breakout.
April 18, 200817 yr Author I think I want them as a list of dates associated with the index id they came from. How do I go about doing that?
April 18, 200817 yr As Michael pointed out already, you will need a script to generate the related records. You can write a loop to generate the records.
April 18, 200817 yr I need to obtain the total amount of rooms booked by date. I am afraid that doesn't say much about HOW you intend to obtain and present such amount. If it's by a relationship, then you don't need to do anything. If it's by a report, sub-summarized by date - then you will indeed need to break up the single booking into separate records, one for each day.
April 18, 200817 yr Author Can you direct me someplace online or if you have a good example of a loop statment using the filemaker scripting language? I am having trouble with the syntax and if I could just see a good example that may help me.
April 18, 200817 yr Here is a file that was quickly whipped up to help you get started. RoomBooking.zip
Create an account or sign in to comment