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.

Creating a dynamic range portal

Featured Replies

Hi, i hope someone can help me with this,

i'm trying to make a portal with a range between two timestamps

my records all have a date and time field

i made a selection box 'select', with '1' as the value for a [X]

a calculation 'Timestamp_selected'

> If(select;Timestamp ( Datum ; Start );"")

resulting in a timestamp when the record is selected.

now, i'd like to select two records (by putting a 1 in the 'select' field)

and see all records between the two calculated timestamps in a portal.

i tried this with three more calculations;

> the calculationfield 'one' = 1

for a relationship called 'one': one=one (resulting in a relationship with all other records)

then two more

>timestamp_from MIN(one::Timestamp_selected)

>timestamp_to MAX(one::Timestamp_selected)

resulting in a relationship based those two;

timestamp ≥ timestamp_from

AND

timestamp ≤ timestamp_to

unfortunately FileMaker doesn't accept those, because they refer to a relationship...

Any suggestions how to tacle this?

This really confuses me:

"now, i'd like to select two records (by putting a 1 in the 'select' field) and see all records between the two calculated timestamps in a portal."

How are you selecting two records? A portal is a relationship btw one parent record and its children. What is the parent record? Why a portal? Why not just find for a date range in the child table?

PS: Welcome to the Forum

Edited by Guest

I think all you need is a calculation field cTimestamp in the data table (result is Timestamp) =

Timestamp ( Datum ; Start )

Then make the relationship:

TO::timestamp_from ≤ Data::cTimestamp

AND

TO::timestamp_to ≥ Data::cTimestamp

  • Author

Thanks for your quick reply, i found another way to show the range, i'll include a example file, comments are welcome.

example_daterange.fp7.zip

Edited by Guest

Your method will not allow each user to view their own range.

Here's something very similar - only simpler.

example.fp7.zip

Nice, comment, but where's the portal? The OP mentioned selecting two records to determine start and end and then showing all records that fall between start and end in a portal.

That's why I didn't reply with a demo like this.

I addressed the portal issue in my first reply. It's up to Andre to explain how users could select the records, when the portal itself shows the RESULT of such selection.

It didn't seem to me that he understood that there's one parent for a portal. It really seemed as if he was trying to filter a portal based on selecting two parents. Certainly, the use of global fields for the filter didn't occur to him.

And, in the end, your demo doesn't even have a portal. Whatever.

  • Author

Thank you.. it's much simpler that way

nice trick with the background, and the shift-click was new for me too

bcooney: i discarded the portal idea, because this worked for me just as fine :smirk:

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.