Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » How to provide choices for two compound foreign keys in a form? (I want to provide a selection mechanism such that fill two fields in a form can be chosen and populated.)
How to provide choices for two compound foreign keys in a form? [message #4853] Tue, 21 July 2015 21:15 Go to previous message
rafs is currently offline  rafs
Messages: 69
Registered: May 2015
Member
I have a list1 for families, a list1 for variants.
I have a link1 from families to variants; and a link1 from variants to families.
families --< families_variants >-- variants
famiilies_variants only has (family_name, variant_name) as PK, with each field also being a FK to the parent tables.
This part is working fine.

Now, I have a table called lines, and a line is has a compound foreign key linking it to families_variants.
So,

lines
-----
line_id
line_text
...
family_name
variant_name

The question is, when filling in the New 'line' form, how to best go about providing the user with a method to select a combination of (family_name, variant_name) from the available entries in families_variants?
It would be good to allow them to choose a family_name, and then choose the available variant_names, or (bonus) if they could choose variant_name first, then choose the available families.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compound foreign keys in linking tables
Next Topic: ERROR: 22P02: invalid input syntax for integer
Goto Forum:
  


Current Time: Wed Nov 27 18:08:30 EST 2024

Total time taken to generate the page: 0.01014 seconds