Menu

Multiselect with composite primary key

0 votes

Does dbFront support multiselect lookups, where one of the relationships consists of a composite primary key? I tried setting it up but it's only showing as One to Many. Not sure if it's unsupported or I'm doing something wrong.

in How To by (2.3k points)
Hello Daniel, what fields types are you using for your Composite key?   After some testing it looks like dbFront partially supports it.  dbFront sees it at both ends but only allows your to add the relationship to the form on the simple side.
it's a 3 way composite primary key on one side, 2 int and 1 smallint. The other side of the relationship is a single int column

1 Answer

0 votes
 
Best answer

dbFront does recognize a composite key in a Many to Many (M-M) relationship but it is not able to create the correct UI for a Multi-Select widget.

A good work-around is to add an Autonumber field to the table with the composite key and create a Unique index on that Autonumber field.

You can then setup the associate table using the Autonumber field instead of the composite index.

For more details on creating a Multi-Select see. Multiselect Lookups/Dropdowns

by (64.3k points)
selected by
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...