I couldn’t say exactly if there’s a better approach since I don’t know the larger context of your problem. To answer your basic question, dropdowns can be populated from child table values.
Any control that supports a list of items (dropdowns, multiselect boxes, etc) can be populated from number of a sources. Under the “Choices” tab for your control, you’ll see that you can pull the values from a keyword, type them in right there, or get them from an XML application. You could write an XML application which grabs the values from the child tables in the Percussion database and lists them as choices in a dropdown. I’m not sure if you’re familiar with XML apps, but if you went through Percussion developer training, it’s one of the things you did. If not, I can look and see where they cover this in the documentation.
I’m not sure what is meant by “primary” in your situation, but why not add a field in your child table such that there would be a checkbox where the user could indicate whether the value entered was primary or not?
Thanks for your reply - I did think of of using an xml application but did not know which tables to hit (and how the database tables are named based on the field name of the child table).
I cannot use a checkbox since i want to be able to pick exactly ONE as the primary. Hence if the second record in a child table is selected as the ‘primary’, then a record in a different child table that was earlier selected as primary needs to be automatically ‘unchecked’. More like a radio button across multiple child tables.
Hence I thought it will be easier to have a dropdown that lists all records from all the child tables.
Please tell what database tables I am looking for so I could query them.