Re: many-to-many



On Thu, 2009-12-03 at 09:06 +1300, Andrew Ruthven wrote:
On Wed, 2009-12-02 at 13:20 +0100, Michael Hasselmann wrote:
Am Mittwoch, den 02.12.2009, 22:36 +1300 schrieb Andrew Ruthven:
Hi Michael,

Thank you for the prompt response.  I'd managed to get that far, but
now, can you make the Day field in the "remote portal layout" a
drop-down list showing the Day's defined in the Day table?

I wasn't sure how far you got but it's good to know that we look on
similar results now.

Yeah, no worries.

If I:

1. Right-click on it in details view,
2. Choose "Layout" from the context menu,
3. Highlight "field: days::day" and click on Formatting,
4. "Select Use custom formatting"
5. Go to Choices tab
6. "Choices From Related Records"

I can't see the "Day" field  in any of the drop-downs.

odd, I just tried with my example file, and I could select a
"DaysID" (display name of avail::days_id). Perhaps that's because I made
an explicit avail::days_id to days::day_id relationship in the
availability table.

I can see avail::days_id, but that is the ID of the day, not very
helpful for people.

Well, I don't think you can avoid showing the days_id. The only way to
identify a record in a related table is by specifying the ID. But when
people choose an ID (a product ID, a day ID, etc), the choices drop-down
can show them another field (the product's name, the day's date, etc) as
a secondary field in that combo box.

But ideally in this case, the date itself would be the primary ID in the
days table. That's meant to be possible, but I haven't tested it much.

Where days::day should be a drop down combo box box of allowed values.

I think the bug here is that the _custom_ field formatting's choices for
the portals's field only offers relationships for the parent table
(People), instead of offering relationships for the field's table
(Availability). I'll try to fix that bug in the UI.

However, as a workaround, and this is maybe better anyway: You can set
the _default_ field formatting for the Days ID field in the Availability
table. The UI allows you to do that properly. Then that formatting will
then be used everywhere, including in the portal. It seems to work. I
have attached a .glom example file.


-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com

Attachment: ruthven2example.glom
Description: application/glom



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