AnsweredAssumed Answered

Calculation field as foreign key

Question asked by mikem on Jan 14, 2014
Latest reply on Jan 18, 2014 by mikem

Hi Forum,

 

I am trying to understand an inherited database. In this database I have an Activites child table related to a Schedule table. The Schedule table has a standard auto-enter serial number primary key. There is a nScheduleID field in the Activities table, but that is not the field used to define the relationship. Instead a calculation field has been created, with =GetAsNumber(nScheduleID), and that calculation field is used as the foreign key field. As the name implies nScheduleID is already defined as a number field, so the calculation does not serve any obvious purpose. So why is it set up this way? My guess is that it was an old trick to write protect the foreign key field? (The database is quite old, though now in FMS11). Or is this a current technique to protect a key field against changes? Seems that the relationship could have been directly to the nScheduleID field, with the Prohibit modification checkbox set.

 

Thanks for any enlightenment.

 

Mike

Outcomes