Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Using date ranges to constrain portal data...


This topic is 5255 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I want to create a portal that has a start date field and an end date field which will constrain the portal data. I'm not sure where to start. How does Filemaker handle dates; for example, is 1/1/2001 lesser or greater in value than 12/1/2009?

When I enter a date range into the date fields, I want the portal to automatically update, so I imagine that I need to do this with my portal relationship. Can anyone give me some clues on how to start?

Posted

Filemaker handles dates as dates: any date in the year 2001 is lesser than a date in 2009.

Unless you use version 11, filtering a portal means filtering the relationship.

Posted (edited)

Enter Layout mode, double-click the portal, select 'Filter portal records' and enter your criteria.

P.S. Please update your profile.

Edited by Guest
  • 1 month later...
Posted

so let's say I have a portal that shows items and their expiration dates. The items table has a "processed" checkbox field. I want my portal to show items that do not have "processed" checked and the expiration date is past today, or the expiration date has not happened yet.

I made a calculation that shows the FK_CustomerID if the criteria is matched above but found out you can't base relationships on fields that cannot be indexed.

I am unfortunately using fp5 files.

Thank you very much for any suggestions.

Posted

IIRC, in version before 7 this could be accomplished in two ways:

1. Use the Today function instead of Status(CurrentDate). This enables the calculation to be stored. OTOH, it requires the file to be re-opened in order to recalculate the date in all records.

2. Use Mikhail Edoshin's Smart Ranges method to generate a multi-line key covering the range from today until ... (ideally, until December 31, 3000). I think there was also a plugin for this.

Of course, the easy way would be to upgrade to version 7 or higher, to allow non-equijoins and multiple predicates.

Posted

thank you so much for the reply. I am going to get to work on that today.

If I go from fm6 to, say, 11... is there a utility that might convert my files somewhat easily.

Thanks again

Posted

Filemaker will convert the files - but depending on your solution there may be additional work to do.

See also:

http://fmforums.com/forum/showtopic.php?tid/192160/

This topic is 5255 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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