alfmaui Posted April 17, 2008 Posted April 17, 2008 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?
Lee Smith Posted April 17, 2008 Posted April 17, 2008 do you want a list of these dates, or do you want separate fields?
comment Posted April 17, 2008 Posted April 17, 2008 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.
alfmaui Posted April 18, 2008 Author Posted April 18, 2008 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.
alfmaui Posted April 18, 2008 Author Posted April 18, 2008 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?
mr_vodka Posted April 18, 2008 Posted April 18, 2008 As Michael pointed out already, you will need a script to generate the related records. You can write a loop to generate the records.
comment Posted April 18, 2008 Posted April 18, 2008 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.
alfmaui Posted April 18, 2008 Author Posted April 18, 2008 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.
mr_vodka Posted April 18, 2008 Posted April 18, 2008 Here is a file that was quickly whipped up to help you get started. RoomBooking.zip
Recommended Posts
This topic is 6064 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