View Full Version : Sound Concept?
squeaky
01-31-2008, 09:57 AM
I think I tried to do this back in the mosforms days :-[
Do we think this is possible ? (attached)
I thought a piccie might work better than my attempt at articulating what I'm going to try and do. 8)
squeaky
02-04-2008, 09:08 AM
Thanks Rob, I'm going to give it a go...if an ignorant fool like me can pull this off then this software is the bees kness ;D
squeaky
02-04-2008, 12:51 PM
first attempt a complete and utter failure :-[
I'll start through the manual again ;)
cheesegrits
02-04-2008, 06:24 PM
Let us know if you have any specific questions.
I'm back after having to take a couple of weeks off from Fabrik to deal with some Real Life issues. And Rob has been slammed just trying to get 2.0 Beta out. So hopefully now I'm back, support responses will be a bit quicker.
-- hugh
squeaky
02-05-2008, 07:34 AM
Thanks Hugh. The problem was simply me jumping straight into my project without first tip toeing through the manual and it's composer example.
Two answers may help guide me though (unless you want to DO it LOL)
if the final form is no more than say..6000 rows is it worth building the relationships at all- i could easily create one flat table --- of course the form would then need a couple of drop downs at the top so staff could choose the class from one dropdown which then produces a student list in the second, which when student chosen means the correct row is open.
If that is not possible, or a worthwhile route..would you at least suggest starting from the initial user table and building up the views through to the final form OR start with the final form and work through backwards ? I hope that's not too odd a question!
really the tables should be relational - it will save you major headaches later on with dealing with the date.
i'd start making tables and forms for each individual object e.g. a class, a student an enrollment etc
Then, if you can, try using database join elements to create the drop downs in the enrollment form - e.g. one for class, one for student.
squeaky
02-07-2008, 08:05 AM
Thanks Rob, that most simple of advice worked a treat for me ;D
At least in getting started. I now have three tables, three forms, and various groups and elements for each. Admittedly most of the elements I've left as Text fields for the time being.
I've now also got a drop down of usernames which limits the table view of Table2. Not the best option, preference would be Table2 limited by which user is logged in automatically... BUT a perfectly workable solution.
What I've not been able to discover is how to create a link in Table2 (which is the class table) to return a table of students with the same class code.... cue some knight coming to my rescue (though I'm not pretty or have long hair!)! :P
preference would be Table2 limited by which user is logged in automatically..
for this you can apply a prefilter to table2 -
see the faq here for more info http://fabrikar.com/index.php?option=com_smf&Itemid=9&topic=1796.0
What I've not been able to discover is how to create a link in Table2 (which is the class table) to return a table of students with the same class code....
ok for this, if you have not yet done so you will need to create a fabrik table that joins the students to the classes (this is presuming that students can go in more than one class). Lets say this new fabrik table is called "student_class".
In this table you would then need to make the class_id in the student part of the table a database join element that connects to the original class table.
Then edit your class table and under the data tab, right at the bottom there should be a section called "Tables with database join elements linking to this table " with the "student_class" table listed.
select "yes" for the "Link to table" option and enter a label for the link (such as "view students") - (if you are not running the latest code from the SVN the label might not be there - if it isnt dont worry!)
save your table
View your class table and it should have a new column with a "view students" link - which will show the students for that given class
Cheers
Rob
squeaky
02-08-2008, 08:33 AM
You are a star :)
I now have the staff enrolment table limited by login id with the pre-filter
and the staff enrolment table to show a column called 'student table' and 'student form' (linked to student table)
as yet I can't get a link to appear in either of those columns, though a relationship is there because if I add a listing to the student table in the back end the drop down from the staff enrolment table appears.
it also will not show the 'student table' column if I don't also tick the 'link to form' check box in the tables data tab.
I'm getting very close :)
ok think this is a bug in the code - i've attempted to fix it in the SVN, could you update your files from there please (details in my sig) - of course backup the files first
Cheers
Rob
squeaky
02-11-2008, 07:45 AM
A bug, good that makes this thread seem almost useful to you ;D
I used tortoise over the weekend to update, and I do have the facility to label the links now..however unfortunately still no actually link in there
squeaky
02-11-2008, 08:21 AM
and the myid prefilter, though still being applied, is no longer visible in the Admin Table view..the headings are just not the actual filter settings
<edit> Actually it's not applying the filter..screen shot attached of what happens when adding filter
odd can you delete the filters and recreate them?
squeaky
02-12-2008, 07:57 AM
it looks to be related to IE7, the filter options appear as normal on Firefox (home) but not at work. I'm still not sure how it disappeared, but I'll put it back in tonight.
Still have the problem with the link not appearing in the table however.
ah right - darn IE :D - will take a look at fixing that now for you :)
Rob
should be fixed now
cheers
Rob
squeaky
02-13-2008, 07:32 AM
aye that's fixed it :)
any idea why the 'view' link is not showing Rob ? is it just me or something for you to fix up?
cheers for everything
Les
no idea - it works here - if you pm a super admin acc to your site i can try to put aside some time to take a look for you
Cheers
Rob
ok label now appearing - had a bug in the code so i installed joomexplorer to be able to upload the corrected file for you
Your join on the student table has an error in it though so you will need to look at redoing that
cheers
rob
squeaky
02-20-2008, 10:03 AM
fantastic Rob!
Yeah the student table got messed up when i tried fixing this myself..well, by fix i mean alter field types and names semi-randomly hoping for a reaction LOL
cheers :)
squeaky
02-20-2008, 10:49 AM
I thought it wasn't working but I've figured it out!
The 'View' link parses the current table row primary key across to the new table rather than any other field. Is that correct?
As soon as I changed the primary key from the fabrik default to the moduleid I have a successful outcome. And I see your update fixed a couple of small problems i was having too, so many thanks again Rob :)
vBulletin® v3.8.6, Copyright ©2000-2010, Jelsoft Enterprises Ltd.