Assuming that you have a relationship between the two tables matching on taskNumber, add an auto-enter calculation to HT::interval that simply refers to (is) AMP::interval.
HT::Interval = If HT::tasknumber equals AMP::tasknumber; get AMP::interval of the record that contains the defined AMP::tasknumber (which is equal to HT::tasknumber).
The part in bold is already encoded in the relationship definition between AMP and HT.
once HT::interval inherits the value of AMP::interval, is it allowed to change? Or is it always tied to AMP?
I'm wondering if you need two static fields with the same value.
Hi David, It is always tied to AMP.
Hi Erolst, I tried this before, but it didn't work.
It is always tied to AMP.
... then you should either eliminate the HT::interval field, or change it into a calculation that is equal to AMP::interval. You don't want to commit a database sin and repeat data in static fields.
If you choose to eliminate the second field, you can still view the AMP::interval from the HT context via the relationship you have set up (based on tasknumber).
I tried this before, but it didn't work.
Do you have the appropriate relationship in place? Also note that ...
- you need to uncheck the "Do not replace existing values ..." option for the auto-center calc if you're testing this with existing records that already have values
- choosing that option will not change already existing records; that must be done manually.
Also- adding to David's post - be aware that you only need the same field in both tables if you want to capture a current value, so that later changes in the interval of the matching AMP record do not change existing interval values for HT child records. If AMP never changes, you can in HT simply display (on the layout) and reference (in calculations) the value from the matching AMP record.
Last but not least perform a sanity check: make sure there is an AMP record with the taskNumber entered in HT, and that it has an interval value ...
You can test your relationship by placing the related AMP::taskNumber field on the HT layout; if you enter a good value in HT::taskNumber, you must (by definition) see the same value in that field.