July 10, 200916 yr 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?
July 10, 200916 yr 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 July 10, 200916 yr by Guest
July 10, 200916 yr 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
July 12, 200916 yr 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 July 12, 200916 yr by Guest
July 12, 200916 yr 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.
July 12, 200916 yr 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.
July 12, 200916 yr 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.
July 12, 200916 yr 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