0

parent child relationship

OK. Got a different approach to the same problem. I'm really close!

Three tables:

1. grandparent: plant family

2. parent: crop

3. child: variety

the table relationship works. now I want to create a crop plan table. where in relationship to the other tables does that go?

option 1: 

crop plan is child of crop. I create record, choose the crop, and then it shows me all the varieties associated with the crop. I just need ONE???

option 2:

crop plan is child of variety. I create record, choose a variety, except I can't see the crop here???

option 3:

crop plan is another parent pointing to variety AND crop. I can choose a crop, but when I choose a variety, I see a list of varieties in no relation to the crops.

8 replies

null
    • Simon.1
    • 3 yrs ago
    • Reported - view

    A quick thought is that it's generally bad practice to create records IN child tables (parents give birth to children!) , so I don't think your crop plan should be a child table. I'd need to have a play with which (or both) of variety and crop it points to though.

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Hi Steph

    you may this video usefull from youtube

    https://www.youtube.com/watch?v=xI5SA3Vbx7A

    • steph.1
    • 3 yrs ago
    • Reported - view

    thanks. I sort of understand what you are saying. I have tried this also without the generational setup and I can't grab BOTh crop name and crop variety onto the crop plan. I have to pick each of the fields individually, which is what I want to try to avoid. 

    what I want is to have a crop plan table where I select the crop, then select the variety (of the possible varieties listed in the variety table where it is clear what crop relates to what variety), then enter the subsequent info like date, etc. 

    the reason I have it setup generational is one plant family has multiple crops and each crop has multiple varieties. 

    I wish I could send a pic of my data model, but that's still broken. I also tried signing up for a webinar but support was a no show.

    • steph.1
    • 3 yrs ago
    • Reported - view

    thanks Mel. I did watch that and it made a lot of sense and it got me to this point but it doesn't cover grabbing two bits of info from two different tables. 

    • Simon.1
    • 3 yrs ago
    • Reported - view

    To add to the above, your crop plan needs to be set up with the just the link to "crop" showing initially, and the "variety" link appears after a crop has been selected. You'll need to add a constraint so that it shows just the varieties of the crop you've chosen.

    • steph.1
    • 3 yrs ago
    • Reported - view

    sean. yup already read that. was good, but I can't make it work for my database. I've tried searching for generic parent child relationship tutorials, but it got way over my head.

    simon. that is a good idea. what is the type of formula operator I would use? I am a farmer. a somewhat tech savvy farmer, but farmer nonetheless.

    • Simon.1
    • 3 yrs ago
    • Reported - view

    Steph - I've sent you an email.

Content aside

  • 3 yrs agoLast active
  • 8Replies
  • 734Views