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.

Featured Replies

I found this on FileMaker.com forum. I found it interesting and am trying to get it to work correctly. I have been working on it but have not got it to work properly. I am pasting the text below. Will someone with more understanding interpret it and make a sample of it. Thanks in advance.

If a holiday (of one or more days) occurs between StartDate and EndDate, and you don't want to count the holiday as a work day, then some changes are required. First, create a new Table, HOLIDAYS, which contains the following fields:

Date (Date)

Counter (Number)

Holiday (Text) - Optional

Use the following table to enter the values:

Date Counter Holiday

1/1/07 1 New Year's Day

1/19/07 2 Martin Luther King

2/16/07 3 President's Day

5/31/07 4 Memorial Day

7/5/07 5 Independence Day Observed

9/6/07 6 Labor Day

10/11/07 7 Columbus Day

11/25/07 8 Thanksgiving

12/25/07 9 Christmas

1/1/08 10 New Year's Day

In the Relationships Graph, create a relationship between StartDate in the DATES table and Date in the HOLIDAYS table. Create another table occurrence for the DATES table (DATES 2) and the HOLIDAYS table (HOLIDAYS 2) and create a relationship between EndDate in the DATES 2 table and Date in the HOLIDAYS 2 table.

Create the following fields in your main table:

Lookup Low (Number, lookup)

Lookup starting from the DATES table from related table "HOLIDAYS", copy value from field "::Counter"

If no exact match, copy next lower value

Lookup High(Number, lookup)

Lookup starting from the DATES 2 table from related table "HOLIDAYS 2", copy value from field "::Counter"

If no exact match, copy next lower value

These two fields determine the number of holidays that have occurred between StartDate and EndDate. For example, StartDate = 6/15/07 and EndDate = 7/15/07. 6/15/07 looks up into HOLIDAYS, and no match is found. However, the next lower value is 5/31/07 (Memorial Day), and 4 is returned from Counter. 7/15/07 looks up into HOLIDAYS 2, and no match is found. However, the next lower value is 7/5/07 (Independence Day Observed), and 5 is returned from Counter. Subtracting Lookup Low from Lookup High (5-4=1) returns the number of Holidays that have occurred between 6/15/07 and 7/15/07.

Why don't you post your efforts to date. Then we can see your errors and correct them.

A much better learning experience for you and others! :

The method you describe was probably meant for version 6 or lower. It is easier in version 7 and higher - define your relationship to the Holidays table as:

Main::StartDate ≥ Holidays::Date

AND

Main::EndDate ≤ Holidays::Date

A calculation in the Main table =

Count ( Holidays::Date )

will return the number of holidays in range.

---

P.S. Please remove your duplicate post here:

http://www.fmforums.com/forum/showpost.php?post/256208/

Edited by Guest

  • 4 years later...

This is an elegant, yet simple solution to the problem. It works great.

ONE ISSUE HOWEVER! The greater than and less than signs (I believe) are backwards. When I reversed them everything worked perfectly.

Should be:

Main::StartDate ≤ Holidays::Date

AND

Main::EndDate ≥ Holidays::Date

That looks for holidays between the start and end dates.

The method you describe was probably meant for version 6 or lower. It is easier in version 7 and higher - define your relationship to the Holidays table as:

Main::StartDate ≥ Holidays::Date

AND

Main::EndDate ≤ Holidays::Date

A calculation in the Main table =

Count ( Holidays::Date )

will return the number of holidays in range.

---

P.S. Please remove your duplicate post here:

http://www.fmforums.com/forum/showpost.php?post/256208/

You are right. I just wanted to see if anyone would notice in less than 4 years... :P

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.