Re: Unable to implement list box from related table in table list view



On Sun, 2009-06-14 at 19:00 -0700, BrownsLink wrote:
I have a table called Packages with a field called Rating.  I have
another
table called PackageRatings with field called PackageRating and a
field
called Identifier.  From the Packages list view, I defined a
relationship.
http://www.nabble.com/file/p24027800/snapshot1.png 
When I added the field to the table list view, I used the
relationship.
http://www.nabble.com/file/p24027800/snapshot2.png 

That relationship doesn't seem to be the same one that you mentioend in
snapshot1.png. It seems to be from the other table, in the other
direction.

But anyway, that's showing a field from another table, not the current
table. I guess you want to allow the user to choose an ID in the current
table, so that other information will be visible from the other table.

I selected the Choices tab to implement the list box.
http://www.nabble.com/file/p24027800/snapshot3.png 
Everything looks great.  The table list view shows the right values.
The
list box offers the right choices but when I select one of the choices
to
specify the value for the field I get Internal Error - ERROR:
duplicate key
value violates unique constraint "PackageRatings_pkey"
http://www.nabble.com/file/p24027800/snapshot4.png

I think this is editing a record in the related table. But I think you
want to just choose a value from the related table, to enter into a
field in the current table.

I can see a few things that could provide useful hints:
- That error message should be much nicer.
- We should warn when you specify Choices based on all the current
values for the field itself, if the field should have unique values
(such as a primary key field).
 
Am I doing everything correctly?  I will be happy to file a bug and
provide
my entire database if needed.
-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]