• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Repeat element

karlis

Member
I recently converted a rather large db from Access to SQL and am using Fabrik to make my life easier.
My question is not covered in the wiki about repeated elements/groups.
The questions is about three tables.
The first is "Retreats" the second is "Participants/duties" and the third is "Person".
Retreats<-one---many->Participants/duties<-many---one->Person(as a menu in Participants).
I have a form for Retreats with a group Participants/duties, where I can choose who is attending and what they will be doing. Simple enough.
But when I add a new Participant, I have to also specify which retreat, even though Partiipants/duties is a group of Retreats.
Any ideas?20171120_211550.jpg
 
Just for clarity -- I looked at the tutorials about students/classes, but that didn't seem to solve my problem.
 
Probably the way to do it is to create the three lists separately, rather than creating a participant-retreat group in the retreat form. So delete that repeat group.

Then create a person_retreat list (I'm renaming it because it makes more sense in my head than participant_retreat) which has:

id (the PK)
retreat_id (hidden field, set to format Integer so it saves as an INT)
person_id (join element to person table, value = id, label = name)
duty (whatever ... dropdown, or a join to a duty table, I'd probably go with a join, just because)

Then on the retreat list settings, Data tab, add a Join, from retreat.id to person_retreat.retreat_id, and set it to Repeat.

You should then have a repeat group on the Retreats form where the retreat_id is set automagically, and you get to choose the person and the duty.

You could also set "Front end add" on the person_retreat.person_id join element, so you get a + button you can add more people with.

-- hugh
 
I did as you recommended, but when adding a new person & duty the retreat does not show up automatically, but shows "please select".
 
The retreat shouldn't show at all, if you followed my suggestion and created it as a hidden field, not a join.



Sent from my HTC6545LVW using Tapatalk
 
Yup, the "join to" field in a list join (the Foreign Key on the 'child' table) can't be a database join element, as that messes up the automagic assignment of the FK value to the repeated group.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top