Skip to main content
Question

Many to Many Relationship, Auto Fill Reference Field

  • January 11, 2024
  • 0 replies
  • 337 views

Forum|alt.badge.img+3

My problem is that when i add an attachment from the inspection reports table the information that is added to the attachment table is from the inspection report table and not from the light tower table. 

I have 3 tables, light towers, attachments and inspection reports. light towers have many attachments, inspection reports have many attachments. When i add an attachment from an inspection report, I do not like how the light tower information such as light tower number, is not in the same field as the light tower number that comes from the light tower table. In order for it to populate in the field from the light tower table i have to manually choose the light tower again from a drop down. Obviously this reference field is already filled when i create an attachment from the inspection reports table. Is there anyway to have the related light tower field auto filled based on the related inspection report? Meaning, when I add an attachment from the inspection report table, I do not also have to add the related light tower to the attachment. It would auto populate. Heres a picture of what I am dealing with on the attachment table. If i saved the attachment like this, fields based on the service report would be populated and fields from the light tower table would be blank, i do not like how that look son the default report and I know there must be a way to get both of those on the same light tower. Thanks in advance!



------------------------------
Bailey Desormeaux
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Registered
  • January 11, 2024

Are your light tower table and inspection reports table related? For example - do light towers have many inspection reports? If yes - then you can simply add the [Related Light Tower] field in your Add Record Button as an additional parameter so it auto fills as you expect. 

No matter what - in order for the light tower to populate from an inspection report - you have to know which light tower it should be when you're coming from the inspection report. 



------------------------------
Chayce Duncan
------------------------------