Show multiple tables on one page

eshelman.carl

New Member
First off thank you for creating such a wonderful/powerful tool!

I am working on an app and would like to display multiple queries on a single page. For example: When a users selects a project the resulting page shows the base project info on the top, then another table of all the measurements taken for that project, then another table of all the addiditives used in this project, then another table of notes on this project. It should also have links to add/edit records.

Project 1
Description
Start date

Measurements:
Measurement1 date, data
Measurement2 date, data
Measurement3 date, data

Additives:
Additive1 date, amount
additive2 date, amount
additive3 date, amount

Project Notes:
Note1, date
Note2, date
Note3, date

Is this possible in Fabrik?

Thanks in advance!
Carl.
 
Hi Carl

thanks for the kind words :)

you can use the table mambot to show multiple tables on one page, the filltering of the data shown could be done by appending

Code:
"&tablename___elementname[value]=foo"

to the end of the pages url (replacing tablename with the name of your fabrik table and elementname with the name of the element you want to filter on, and finally "foo" with the value you want to filter on

hth
Rob
 
Thanks for the input, that worked quite nicely. I did it a little differently, I used the custom Detail view url and presorted on rowid. Work wonderfully EXCEPT.... you knew that was coming... when I hit the add button for one of the tables, for example the measurements table, I can not figure out a way to carry the rowid across to the new record to use as my foreign key. Any suggestions, sage advice, or instructions? ???
 
The way I usually do this is with a combo of tablebot and formbot on the same page. Remove the "add entry" button from the table template, and instead have the "Create New Widget" form directly above or below the table. Then they both have $rowid to use, one as a filter, one as an eval'ed default on the parentid field.

-- hugh
 
Actually, come to think of it that's the right answer but for the wrong question.

I'll have to wake up a bit and think about that one some more.

-- hugh
 
It was the right answer to the right question. Or at least I got it to work. It took me a bit to figure out the correct eval string to place in the default text box but once I found your snippet:

Code:
return mosGetParam( $_REQUEST, 'rowid',0);

It all came together. Now the question is how do I get the form to take me back to the same page WITH the ?rowid=X appended to it?
 
not guarenteeing this will work, but perhaps add

Code:
&rowid={rowid}

to the forms jump page url?

Cheers
Rob
 
Well... good news and bad. The good news is I had it working by using the field name of the foreign key as the variable:
Code:
rowid={foreign_key_label}
but all the other variables that Fabrik stuck on confused everything. If I deleted them manually it would work. Is there any way to suppress the other tags that are appended to the custom jump URL?


The bad news is I upgraded to the latest SVN and now none of the prefilters based on rowid are working any longer.
 
Hmmm. Poop.

Are you talking about regular table filters? Using what syntax? Something like ...

{rowid} == 34

... as a non-eval'ed filter value?

-- hugh
 
Nope. I am talking about a table pre-filter based on "{rowid}"

where "Batch ID" EQUALS {rowid) everyone

Batch ID is my foreign key.

The table is being displayed via the includetable mambot. The only changes made from working to not working was the upgrade to the newest SVN release.

I have tried going back to the old Mambot but that did not correct the issue.
 
OK, I see why.

Hmmm. Interesting problem. Filters and things like jump page URL's get run thru the same routine to replace the {placeholders}. But {rowid} means two different things ... to a filter it needs to mean the rowid that was specified on the incoming URL. But to something like a link URL, it needs to mean the rowid of the current table row being rendered.

I guess I'll have to change the code I just wrote to use a different {placxeholder} name, something like {rowpk}.

I'll do that right now and commit the changes.

-- hugh
 
Carl Eshelman said:
Tried it, "{rowid}" returns blank.

OK, I've unmade the changes I made the other day. If I use {rowid} on a jump page from a "normal" component linked form, it works. If I use it from a formbot it doesn't.

I'm working on tracking down why.

-- hugh
 
Any suggestion on how to accomplish what I described above then? I have tried reverting back to the original version of code but even that does not appear to be working any longer.

Thanks for all your assistance on this. If I can get this app working I will definitely subscribe... You guys have earned it!

Thanks, Carl.
 
I'm still trying to wrap my head round this one.

Can you package up your stuff and attach it to a reply? Tables admin page, export.

I've reread this thread till my head hurts, and I'm just confused about exactly how your stuff is set up. If I can install it on my sacrifical lamb test server, I'll have a better chance of working out what's going on.

-- hugh
 
Well... I would BUT:
1) The export does not work. Just get a blank index3.php page.
2) More importantly however, I loaded the newest SVN tonight in an effort to get the export working and it fixed the issues. Its all working again.

Thanks for the help.
 
Back
Top