Fabrik right tool for this task

Starting a new project for a website

Database Version: 5.0.67
PHP Version: 5.2.6
Web Server: Apache/2.2.9
Joomla! Version: Joomla! 1.5.7 Production/Stable

Need to manage data external to joomla.
I can design the database and write queries.

What I'd like is to use Fabrik to design all the forms for data entry and maintenance.

I'd like to further authenticate users via an external table linked to joomla ids to give them view / edit / delete rights to the data.

I also want to generate public and private reports via forms.

A) Can Fabrik do all this? (Have budget -- will spend money !!)

B) How do I go about getting started if the database/tables already exist on the server? It seems Fabrik is design to create the database itself. I prefer to create/maintain database structure externally?

Thanks!
 
To introduce an existing table to Fabrik, just create a Table on the Fabrik backend, and point it at your existing table (under the Data tab). Fabrik will then create a form, group and elements.

NOTE - Fabrik usually modifies table schemas to suit itself. If you don't want Fabrik altering the rtucture of your tables, you need to set the "Alter Field Types" configuration setting to No (under Parameters, top right of Table page on backend).

Yes, Fabrik can control access based on logged on userid, using table pre-filters.

-- hugh
 
So far so good. Fabrik seems to have correctly imported the tables and elements from my database. It created a form as well but the form appears to be blank. When I open the form there's a standard content editor but no controls to add form items (labels, text fields, checkboxes, buttons,etc...) I'm familiar with how facile forms worked but I'm a little lost here.

Here's my next goal -- I want to create a form which can:

a) display first record in a table
b) navigate to previous and next record
c) update the current record
d) insert a new record

Is there some simple tutorial material I'm missing? I will do a diligent search of the forums and apologize in advance if it's sitting there waiting for me to find it.



To introduce an existing table to Fabrik, just create a Table on the Fabrik backend, and point it at your existing table (under the Data tab). Fabrik will then create a form, group and elements.

NOTE - Fabrik usually modifies table schemas to suit itself. If you don't want Fabrik altering the rtucture of your tables, you need to set the "Alter Field Types" configuration setting to No (under Parameters, top right of Table page on backend).

Yes, Fabrik can control access based on logged on userid, using table pre-filters.

-- hugh
 
ok cool. catching on.

I added a tableview and attached to a menu item. It works!

I was not able to use the add listing feature of the tableview. Error is "Store Row Failed" and then what looks to me like good SQL to do an insert.

further inspection reveals its trying to add the data to a table in my joomla DB (which of course does not exist -- the table is in ANOTHER db. apparently it can view that data but not insert a new record in it

further further inspection:
table view works just fine. form views seem to broken (front end and backend)
front end i get an a single error
Code:
Warning: Invalid argument supplied for foreach() in W:\www\tobdemo\components\com_fabrik\models\form.php on line 1311
backend i get 3
Code:
Warning: Invalid argument supplied for foreach() in W:\www\tobdemo\components\com_fabrik\models\form.php on line 1311

Warning: Invalid argument supplied for foreach() in W:\www\tobdemo\components\com_fabrik\models\form.php on line 1311

Warning: Invalid argument supplied for foreach() in W:\www\tobdemo\components\com_fabrik\views\form\view.html.php on line 166







However updates from inside myphpadmin show up just fine.
 
So....

no wysiwyg editor for the placing the form elements right? i get a serial listing of the elements listed in each group added to the form.
 
So....

no wysiwyg editor for the placing the form elements right? i get a serial listing of the elements listed in each group added to the form.

Correct.

We do have a not-so super-secret longer term project for adding a graphical form builder, but that won't enter public testing for some time.

-- hugh
 
See:

http://fabrikar.com/index.php?option=com_mojo&Itemid=36&p=28

... for details about basic tutorial. it's for 1.0.x, but the same basic principles apply.

When you've grasped more of the basic concepts, let me know and I'll walk you thru your a) to d).

-- hugh

Ok. I think I'm rapidly getting up to speed.

Suscribed for a year (should I restart this thread in the "subscribers" area?)

Added some dbjoin fields successfully (after adding chart to the plugins table!) . Can we get to a) to d)? It more of the application side of things.

Can I create "views" and operate on them as a table? Suppose I want to select some records via a query and present them as table (maybe suppressing some the fields in the table as well) (ie what db guys call views). What's the best approach? Just create another table? Or are tables a 1 to 1 link to the physical table and you can't have more than one ?
 
Can I create "views" and operate on them as a table? Suppose I want to select some records via a query and present them as table (maybe suppressing some the fields in the table as well) (ie what db guys call views). What's the best approach? Just create another table? Or are tables a 1 to 1 link to the physical table and you can't have more than one ?

I've really been getting my money's worth out of the table prefilters; think that's what you are looking for...check out the data tab in Tables -> Edit (your preexisting table) -> data.

I often copy the primary table, then apply table filters to the copy to do the voodoo that it sounds like you want to do. ;)
 
Although I've not yet tried it, we do have some folk succesfully using MySQL 'views' as tables for display purposes. As far as I know, if you introduce a 'view' to Fabrik as a Table, we don't know the difference - to all intents and purposes it's a plain table as far as Fabrik is concerned. Although I'm pretty sure we'd have issues if you used the form Fabrik creates for each Table you create, and tried to submit data to it.

You can have as many Fabrik Tables for an underlying database table/view as you want. Of course, each one is going to generate a new form/group/elements set, which can rapidly grow your Elements list, but that's why we provide filters for viewing those pages.

I need to answer a couple of other posts, then I'll look at the A to D.

-- hugh
 
PS ... didn't see Terp's post before I responded ... he is indeed correct that you can often achieve what you need with table pre-filters ... even fairly complex filters can be achieved using the 'subquery' technique, by building a subquery that does whatever you need, as long as it returns a list of ID's you can then specify "WHERE foo IN (subquery)" for.

Terp - just to round this one out ... MySQL 'views' can serve a very useful purpose which pre-filters can't. Basically, 'views' are like fake tables, that can build dynamic data on the fly. For instance, perform calculations, or join other data from other tables, and make it appear like a normal table. So you might have a 'view' of another table, which adds an extra column, being the sum of some other elements in that table.

I just did some testing, and will post a "How To" on MySQL views later. I'll update this post to point to it.

-- hugh
 
I haven't actually tested whether we implicitly support updateable views. I put that "use them as read only" in the How To mostly because I didn't have time today to test whether views can actually be updated in Fabrik.

I don't see any reason why they wouldn't be, assuming the view itself doesn't do anything which would prevent it being updateable (like joining other tables, having a subquery in the select, etc).

Feel free to test this out with a simple view, see if the view saves the record, and updates the original table as well.

I'll see if I can find some time tomorrow to test this out.

-- hugh
 
*bump* for ABCD earlier in this thread.

Also when I took some working code and bounced it up to a live server, I don't seem to be able to get Views to work. Error message when selecting "view data"

getData: Unknown column 'o_units.' in 'field list' SQL=SELECT DISTINCT `o_units`.`name` AS `o_units___name`, `o_units`.`city` AS `o_units___city`, `o_units`.`state` AS `o_units___state`, `o_units`.`chapter` AS `o_units___chapter`, `o_units`.`ogroup` AS `o_units___ogroup`, `o_units`.`oclass` AS `o_units___oclass_raw`, `lbls_oclass`.`oclasslabel` AS `o_units___oclass`, `o_units`.`` , `o_units`.`` AS __pk_val FROM `o_units` LEFT JOIN `lbls_oclass` AS `lbls_oclass` ON `lbls_oclass`.`oclassid` = `o_units`.`oclass` LIMIT 0, 20


The link works just fine on my local sandbox. Specs for live host are comparable to sandbox. I can see a couple `o_units.` with no field spec after the dot in the query so I can see why the query fails. What I dont get is why this query works locally...
 
Looks like you haven't set the PK on the Fabrik Table for the view. Although MySQL views themselves can't have indexes, Fabrik still needs to be told which element to use as the primary key.

As for the ABCD, see the notice at the top of every page this week. Till the Linux Expo is over, we're very limited on support resources (basically my free time). Bump again next week.

-- hugh
 
This actually fixes the problem BUT now every edit to table is followed with

500 - An error has occurred.

add key: 'njatob_tobscores.o_units' is not BASE TABLE SQL=ALTER TABLE `o_units` CHANGE `name` `name` int(11) NOT NULL AUTO_INCREMENT
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top