December 29, 200025 yr Hello all... This would be the final key to my scheduler file I am working on. I have fields named 'Start' and 'Ship'. I need a 3rd field (call it 'Dates') that will do a calc that I cannot figure out.... If I enter 1/1/2001 in 'Start' and 1/5/2001 in 'Ship', I need the 'Dates' field to look like this after the calc: 1/1/2001 1/2/2001 1/3/2001 1/4/2001 1/5/2001 I have written out the script, to figure it out logically, but I'm not sure how to translate it into a FileMaker calc... 'Ship' - 'Start' = 'x', 'Ship' (new line), 'Ship' + 1 ('x' number of times) (new line). Am I think of this correctly...? Basically, I need to have the 'Start' and 'Ship' - and all dates between entered in a 3rd field. Any help would be great. Thanks! Jerremy
December 30, 200025 yr The easiest way to do this will be with a script. Although it's possible to do with a calculation, you have to have an upper limit on the difference between the days. I once built a calculation to do just this for an upper limit of three years between the dates and it actually took three fields because the calc was so long that one field couldn't hold it. The calc went like this: Start & Case( Ship >= Start + 1, DateToText( Start + 1 ) & "
December 31, 200025 yr If you are using a script to setup the Dates field, try this: Add a global field gDateTemp (date) then If (IsEmpty(Start)) Exit Script End If Set Field(Date, "") Set Field(gDateTemp, Start) Loop SetField(Date, Date & "
December 31, 200025 yr Troi And Waves in Motion have a plugin that can accomodate this. Date & Time Ranges Plugin
January 2, 200125 yr Author Hello again all... Thanks for you help. That calc was perfect! I have this calc field related to a calendar file, and now all my dates show up on the calendar just like I wanted them to. I'm sure the script would also do what I wanted, but I needed this to be 'automatic'. Thanks again! Jerremy
Create an account or sign in to comment