Jump to content

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

Recommended Posts

Posted

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?

Posted (edited)

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
Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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:

This topic is 5759 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.