Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I need some help...

Featured Replies

How do I create the following: I have a start date for my students their midterm is 75 days from the startdate their final is 75 days from the midterm or 150 days from the startdate. However, summer holidays cannot be counted. Summer holiday is from June 29 until September 3rd.

So, I need a script that will calculate the midterm from the startdate and the final from the startdate.

This has got me stumped so any help would be appreciated.

D. Cannell :P

To calculate which date would be for example 75 days from today you can use get(currentdate) + 75 or in your case you can use start_date + 75 and for the final I'm not quite sure you got that right. I think it should be 75 days from the start date of the 2nd semester and not 75 says from midterm. What I would basically do is create two date fields in your table...call it start_date_1st and start_date_2nd then midterm date would be start_date_1st + 75 and final date would be start_date_2nd + 75....hope this helps

  • Author

That makes sense but in our cyber school the start dates can be any time during the school year. Some students could start in May and then span the summer...hence the need to alter the midterm and final dates. So the students have a 150 days from the day they start to complete the course material. I would like to be able to tell them what their start, midterm and final dates would be...if they span the summer I would have to not include the summer dates in the 150 days.

Clear as mud right?

Edited by Guest

I see what you mean...so the only info you have on hand is their arbitrary start date, the 75 days between exams, and holiday dates...let's try this:

if start_date < june_29

{

// midterm

if june_29 - start_date > 75

midterm = start_date + 75 //midterm falls before summer

else // mid term is after summer

midterm = sep_3 + 75 - (june_29 - start_date) //minus days already spent before summer

//final

if june 29 - start_date > 150

final = start_date + 150

else

final = sep_3 + 150 - (june_29 - start_date)

}

else

{

midterm = start_date + 75;

final = midterm + 75;

}

May not be perfect and may require some tunning, but you should be able to transfer it to filemaker if/else grammar. Make sure start_date, Sep_3 and June_29 are date fields

Hope this helps

  • Author

Thanks for the help...I will see if I can get it into filemaker script language and then let you know if it worked.

Thanks.

Hi Darren,

To determine the mid term, you might try calculation (date, unstored) with:

startDate + 75 +

If (

startDate + 75 ≥ Date ( 6 ; 29 ; Year ( Get ( CurrentDate ) ) ) and

startDate ≤ Date ( 9 ; 3 ; Year ( Get ( CurrentDate ) ) )

; 67 )

This kicks the date forward through the holiday period of 67 days. To create a final term calc, replace the 75 (in both places) with 150. This will break if the startDate is WITHIN the holiday period.

Edited by Guest

  • Author

Thanks a pile this worked great...I appreciate the effort. The start date will never fall in the summer months...very cool.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.