Create a relationship where:
TABLE1::StartDate <= TABLE2::CurrentDate
TABLE1::EndDate >= TABLE2::CurrentDate
You can then show a portal of T2 on a T1 layout, and only see records where the date is in range.
Some questions, clarifications, though:
- Is "currentdate" today's date? If so, you'd want to make it unstored (so it keeps updating as time moves) and then this relationship wouldn't work from the perspective of T1
- "any new layout calls this table"... I'm not sure what this means
Thank for the Tip.
CurrentDate can also be today date, but is actually an Account date that can be changed, but cannot exceed the prefixed range.
About Layout maybe I was not too clear.
What I intended is that at any time I can create a new layout that displays data from TABLE2, also in this case I would need to have the layout extract only the "range" of date that are stored in the TABLE1
I think you're solution would work anyway.
Am I right?
Relationships don't inherently determine found sets on layouts. They determine what records are related.
So a layout based on table1_table2 will still show all the records in table2, unless you used the relationship (go to related records from table1) to get there. Even then, the user can see other records using find, show all, show omitted, etc.
Not sure if that's clear, but if it was, you should be set.
But should work fine for me.
Thank you Chris
Be sure to mark Chris's answer as the correct one. Since you're the one who posed the question, only you get to see the clickable star that recognizes his expertise and assistance.