Changing visible field when selecting many-to-many entries?
Archived from the Xataface Users forum.
sophistry — Fri Jan 30, 2009 11:13 am
I was wondering if anyone else had a problem getting the right field to show up in the “Add Existing … Record” entry form.
I have a Users database, and a projects database, connected many-to-many through a join table, but when I go to select a user to add to a project, it only gives me the user’s ID. I’ve added a fields.ini and valuelists.ini to define a vocabulary to replace it … from what I read in the tutorial. I even copied the valuelists.ini and fields.ini into the table folders for all three tables.
I get the replacement when viewing the user’s record just fine, but I still see the ID number when selecting from the projects entry.
Any thoughts?
Rory
shannah — Fri Jan 30, 2009 11:27 am
You’ll want to implement the titleColumn() method in the delegate class for the target table of the relationship, so that Xataface knows which field to use as the title of the record.
-Steve