AnsweredAssumed Answered

Storing records in related table

Question asked by guit4eva on Oct 20, 2017
Latest reply on Oct 20, 2017 by bigtom


Hey guys,

 

Just want to double check if I'm doing this correctly:

 

I have two tables:

 

Equipment

- ID

- Name

- Type

- Check_Date

 

Equipment_Checked

- ID

- EquipmentIDfk

- Equipment::Name (unchanging - so displayed from Equipment field)

- Equipment::Type (unchanging - so displayed from Equipment field)

- Check_Date

 

I need to keep a record of all the times an item of equipment was checked. My current way of trying to do so is the following:

 

1) Make Equipment_Checked a related tabled: ID -> EquipmentIDfk

2) When entering a date into Equipment::Check_Date have a script open up the Equipment_Checked layout and set_field[ Equipment::Check_Date ].

 

However, I'm not sure that I am on the right path for doing this correctly. Should I be using a script at all? Or is it possible to populate the records table (Equipment_Checked) with data automatically when entering data into the Equipment::Check_Date field?

 

Hopefully that all makes sense? Thanks so much in advance!

Outcomes