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.

Relating a Time to a Range of Time

Featured Replies

Hey everyone!

Had a question I was hoping someone could help me with. I have a database that holds person info and their appointment dates & times. I am trying to create a relation that will allow me to see who has a appointment within the area of an hour both before and after. So I created a Self-Joining relation with the date as one join, and the time from one to a time calc range, i.e. 3:00...5:00. This isn't working because the calc is a text, and not a value. Does anyone have any ideas?

Much Appreciated.

Hi

you need a multipredicate relationship:

g_date = date

g_timeStart ≤ time

g_timeEnd ≥ time

where those 3 fields ( g_date, g_timeStart, g_timeEnd ) are global fields that you have to enter.

  • Author

Thanks for the quick response. That is what I thought, but didn't know if the greater than lesser then would CXL each other out.

Thanks,

Brett

Daniele's method is good. Another approach that might work is to create 2 calc fields, one that is your time - 3600 and another that is your time + 3600. Now make a relationship from the original time field that is < one and > the other. Does that make sense? I.e., her method sets up globals as the parents and the time as the child; mine uses these calcs as the parents.

Edited by Guest

her

Hi Fitch

[color:red]his :

  • Author

Thanks guys, this info is great!

I have another question relating to the portal issue. So my goal is to have a sum of all the appointments in a time range, as described above. I have the portal set up so it is relating all the appointments scheduled for that range, that part is done. Here is the new road block!

I am doing this all to try and calculate how many offices are being used at during a time period. So I was planning to simple add the rows together and get a number there, but I am running into the problem of the same people having different appointments in that range. Would this require an additional relationship to make one of those Records NULL, let say, or do you think this can be done with a calculation?

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.