How to locate N:1 relationships that contain data?
I have created an Orders table that is associated with three tables named after people's names. I want to use a code snippet to locate the associated tables (the ones that contain data). For example, the second row of the Orders table has data for Emma Johnson. How can I edit this code?
6 replies
-
Are you trying to figure out if a reference field has a link? And if it does then to use that link? Will there be times that more than 1 reference field is used? Could all three be used?
It can be done, but with a structure change it can make the coding simpler.
You may want to consider creating one table with a field that stores the people's names and other fields that store the specific data you need.
-
said:
Are you trying to figure out if a reference field has a link?Yes,Fred
said:
And if it does then to use that link?If it contains a link, it will extract related elements from within the table (the content format that needs to be extracted within the three forms is the same).
said:
moreThere will not be multiple reference fields; only one reference field will appear. They can all be used, but I need to confirm which reference contains the related information.
said:
It can be done, but with a structure change it can make the coding simpler.Could you share the two approaches of not creating and creating?
"Additionally, the name form will have new entries."
-
said:
Could you share the two approaches of not creating and creating?Take a look at the attached DB. You can see how much simpler Formula 2 is compared to Formula. Since you never have more than 1 person linked, then a subtable will work. Or you can even just link to the new People table in Orders and get to the same data.
I guess you could even use the three people reference link in the subtable, but on the surface it seems like a problemsome design choice.
Content aside
- Status Answered
- 1 mth agoLast active
- 6Replies
- 44Views
-
2
Following