I can't quite follow your description of this issue. Perhaps you could post an example or two showing the states, dates and results you want?
Ok, I describe you the issue with a example.
Table Equipment Table State
Serial number State end's date
State State start date
End's of State date
State can take the following values: Warranty, Chargeable, Contract...
In the table state we will have the possibles states that a equipment can take. My issue is, that I don't doing in order that for example once a day, they are verified the dates and change or not the state, it is necessary to bear in mind that we will have many equipments.
I need to confirm some details here. One record in State would appear to record the period of time that a specific item (equipment) spends in a given state. Am I correct?
If I establish the following relationship:
Equipment::ID_EQ = State::ID_IQ
Then a portal on a layout that is based on Equipment could show all State records that exist for that equipment. The portal can also be sorted by Start Date to display the states in chronological order.
If I make a different relationship:
Equipment::ID_EQ = State::ID_IQ AND
Equipment::cToday > State::StartDate AND
Equipment::cToday < State::EndDate
Where cToday is an unstored calculation field: get ( CurrentDate )
I could create a portal that only shows those state records that are consistent with today's date.
Either of those do what you need?
(Note: by using two table occurrences for State, you can create both relationships and create both portals on the same or different Equipment layouts.)
Thanks, it is very useful, but i don't know how to create the field cToday for to change, every day, for example.
- Go to Manage | Database | Fields
- Enter cToday as the field name.
- Select Calculation as the field type.
- Click Create
- Enter Get ( CurrentDate ) as the expression
- Select Date in the result type drop down in lower left corner
- Click the storage options button and select "do not store calculation results".
Thank you very much, your help me has been of great help.