I have several many-to-many relationships in my application. I have them working as needed with Join Tables and relationships.ini files. Works just like I wanted The user can select one or more 'codes' from tables for things like HR_violation_code, HR_violation_mo and so forth to attach those attributes to a given victim. (that's a very elegant mechanism)
- Code: Select all
[cases]
__sql__ = "SELECT * FROM CasesVictims, cases WHERE cases.id_cases = CasesVictims.id_cases AND CasesVictims.id_victims = '$id_victims'"
[hr_violation_mo]
__sql__ = "SELECT * FROM VictimsHr_violation_mo, hr_violation_mo WHERE hr_violation_mo.idhr_violation_mo = VictimsHr_violation_mo.idhr_violation_mo AND VictimsHr_violation_mo.id_victims = '$id_victims' "
[hr_violation_code]
__sql__ = "SELECT * FROM VictimsHr_violation_code, hr_violation_code WHERE hr_violation_code.idhr_violation_code = VictimsHr_violation_code.idhr_violation_code AND VictimsHr_violation_code.id_victims = '$id_victims' "
Currently when you select one of the Tabs for a related record, and you use the 'add existing record' function, Xataface 'apparently' displays the value of the 1st non-id field/column (which is what I expected) it contains our 'code value' i.e. 'mue002' - what I would like to have happen is to also supply the 'next column' also - its a translated field with the 'text description' in each language. If I can only have one, then the text field is preferable. Is this a forms/templates issue? I have been wracking my brain all day.
Thanks for an amazing tool Steve.