• 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.

Embedded list popup

Bren

Member
Hi all.
I have a Fabrik details page that also has a list that displays within it via the following embedded list via the content plugin.
Code:
{fabrik view=list id=35 bw_pos___fid=[rowid]}
This List has a check box & a field element within it. The end user would like this information to also appear on the parent list so that he doesn't need to click into the details of each record to see which items are listed and checked off. I'm hoping there's a way to have this info list in a display or calc element in the parent list and when this element is clicked in the parent list a popup (media box) would appear displaying the embedded list (versus clicking into the details on the parent list. Any suggestions anyone?
Thanks in advance.
 
If I got you correctly you can use "Related data":

In your child list set the bw_pso___fid to be a databasejoin element to the parent list.
Then in your parent list in Data/Related data enable the list with Popup=yes.
 
Hi Troester.
Cool. I've never quite understood how it worked or knowingly used the Related data list settings. Now I'm starting to understand. I just tried your suggestion (using a multi-select drop down type - not sure if it matters) and I assumed that when I double-click on the new DBjoin element that the sub list would pop up in a media box; but it doesn't do anything. Am I missing something?
Also, I made a mistake noting above that the embedded list had a checkbox. The checkbox is actually a YesNo Element called bw_pos___received. When I Concat label the DBJoin with "received, ' ', po_number"; then the YesNo portion shows the zero or one (versus an X or check mark image) next to the PO number. Any suggestions on how I can correct this to show the check mark instead of a one & nothing instead of zero?
Thanks in advance.
 
It must be a single dbjoin.
If you enable the "Related data" in your parent list for "list" with this dbjoin element
upload_2019-1-14_21-49-44.png
your parent list will show an extra related data button.
Something like
upload_2019-1-14_21-47-26.png
 
OK, so, I assume you are saying "dropdown" when you say "single dbjoin", correct (as attached)?
I did as you suggested in the related data settings of the PO list (as attached) and then refreshed my material list on the front end; but those buttons do not appear... Could there be another setting I missing?
Thanks in advance.
 

Attachments

  • Snippet DBJoin Tyle.PNG
    Snippet DBJoin Tyle.PNG
    26 KB · Views: 125
  • Snippet Related Data.PNG
    Snippet Related Data.PNG
    40.3 KB · Views: 125
Is pw_pos your parent table?
The "value" must be the primary key of the parent table (usually id[recommended]).
The button will show up in the parent list (PO?)
 
I thought there might have been some confusion there (primarily on my part). The "MaterialShelf" List is what I would consider to be the parent table and the "POs" list is what I would consider to be the sub/child list. What I'm hoping to do is when a user is on the "MaterialShelf" List the POs DBjoin element would contain only POs that are related within/to each "MaterialShelf" record. Then the user could click or double click on the POs DBjoin element within the "MaterialShelf" List and a POs pop up media box with an editable list of these same listed POs that are relevant to the "MaterialShelf" record. The primary key of the "POs" list is bw_pos___id. The primary key for the "MaterialShelf" List is bw_projects___id. So, are we still heading in the right direction (I'm still trying to wrap my brain around this)?
Thanks in advance.
 
I tried reversing things and setup
The new DBjoin in the POs List instead; which points to the MaterialShelf List & PK id. Then, after updating related data in the MaterialShelf List I saw the added column you mentioned. The problem though is that when I add a PO then it doesn’t update the count in the new column. When I click on the new column 0 count a popup media box appears and never finishes loading. Any suggestions?


Sent from my iPhone using Tapatalk
 
'Loading' sounds like an error message in the network respose.
Check in your browser dev console or set popup= No to see the error.

Gesendet von meinem SM-G930F mit Tapatalk
 
Ya, you're right. I've got an error page "500 - Fabrik has generated an incorrect query for the list POs: <br />" when I turn off the the popup. I'll have to dig deeper into that.
Exploring this option reminded me that until now using an Embedded list as a sub-list to records from another list; I've been saving session variables from the parent list record on form load and then retrieving these variables and saving them to a hidden foreign id (key) in the child list record additions. I believe I've never asked if there's an easier way within Fabrik to do this (maybe by using DBjoins wiser). If so, please share.
Thanks in advance.
 
I'm really not sure what you are trying to do ...

I've been saving session variables from the parent list record on form load and then retrieving these variables and saving them to a hidden foreign id (key) in the child list record additions. I believe I've never asked if there's an easier way within Fabrik to do this (maybe by using DBjoins wiser). If so, please share.

Have you tried using the "related data" feature of lists?

-- hugh
 
Hi Hugh.
Yes, that’s where Troester has been leading me in this thread. I’m actually surprised I haven’t messed with it until now. My question is whats he right approach for the joining part? I’ve been digging through past Fabrik wiki help pages and threads; but nothing really takes you step-by-step with setting it up correctly between 2 separate lists. I stumbled onto an old Fabrik tutorial page that appears to; but all the tutorial web links are broken and go nowhere now. Do u have a web link to a simple tutorial or can you share a simple step by step for properly joining 2 lists (parent / child like I mention in this thread)?


Sent from my iPhone using Tapatalk
 
http://fabrikar.com/forums/index.php?wiki/list-joins/#adding-a-join
This for list joins (joining two database tables).

Your 1st post and "related data" are about database join elements (using an other list as lookup table)
http://fabrikar.com/forums/index.php?wiki/list-related-data/
http://fabrikar.com/forums/index.php?wiki/database-join-element/

If you want to use a dbjoin element for "related data" it must be single select (render = dropdown or radiobutton) and the "value" must be the primary key of the selected table (usually id[recommended])
 
With related data, is there any way to move the “linked to list” extra column to another spot in the parent list (instead of the far right beside the edit form & details buttons)? This parent list that I’m trying to apply it to has a flow process from left to right in the list and it would make more sense on the left as the 3rd or 4th column. Is that possible?
If not; then that’s where I was wondering if the “linked to list” column could be replicated using a calc element or something...
Thanks in advance.


Sent from my iPhone using Tapatalk
 
You can add the related data link as a custom link to one of your elements, something like
index.php?option=com_fabrik&view=list&listid=66&Itemid=453&childlist___parent_id_raw={rowid}&limitstart66=0&resetfilters=1&fabrik_incsessionfilters=0&lang=de&tmpl=component

replace 66 with your list id, 453 with your Itemid (menu id)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top