How can we link Detail to Master by field with type KEYS

49 views
Skip to first unread message

Zoi Moravec

unread,
May 19, 2026, 9:10:50 AMMay 19
to Jam.py Users Mailing List
Hi all!
A have table Orders and field members_ids with type KEYS
In any order (order_id = 1) there are can be many members. i.e. field members_ids = 1;2;3 (for example)

And i have table Members and 2 some classic Details tables for it.
How can i add Orders table as detail table №3 for Memebers and show the same record with (order_id = 1) for diffrent members with id=1, id=2 and id=3? This like "many to one" linking...

Dean D. Babic

unread,
May 19, 2026, 10:51:53 PMMay 19
to Jam.py Users Mailing List

Zoi Moravec

unread,
May 20, 2026, 4:13:09 AMMay 20
to Jam.py Users Mailing List
Yes, it's nice case, but it would be great include table bom_assembly_subparts not in view-subdetail, but in view-detail in separate Tab (tabs-div).

среда, 20 мая 2026 г. в 05:51:53 UTC+3, Dean D. Babic:

Dean D. Babic

unread,
May 20, 2026, 4:16:52 AMMay 20
to Jam.py Users Mailing List
It is:
set_where({members__contains: item.id.display_text});
not the:
set_where({members__contains: item.id.value});

Took me a while to figure this out since value produces a tracback! Might be a bug
I do not know how would you display this is a 3rd Detail tab tho. Try to search, ie: https://groups.google.com/g/jam-py/c/uNZrOBVPXeE/m/D0pftkLXAQAJ

Keys_detail.mp4

Dean D. Babic

unread,
May 20, 2026, 4:20:44 AMMay 20
to Jam.py Users Mailing List
Sure thx.
If you figure how pls do tell :) I spent heaps time on this since it was an idea from Django. And still not great coz of Summaries.

Here is the schema:
https://billsofmaterials.pythonanywhere.com/static/bom.html

r rad

unread,
Jun 4, 2026, 3:23:47 PMJun 4
to Jam.py Users Mailing List
Hi,
I'm not sure what your intention is but I'm think that you are want with KEYS type to have m:n relations in Orders (to Members),
and after that to represent only one side relation Members to Orders. 

I think that it is not supported by current Jam.py. Maybe I'm wrong.
When I it try before ..., in version V5 I have to write some JS code and custom table (with custom PKs) for that. 
But I'm don't know enough V7, maybe somebody to know.

PS. And, how to You think, to get more members for one Order in your KEYS field? 
Reply all
Reply to author
Forward
0 new messages