can you make fabrik input data into multible tables?

breach

New Member
Hello!

First off, GREAT extansion!

I have used it for a couple of projects and it have worked as a charm.

But now I have a question.

Can you make the fabrikform input the data into more then just one table at a time?

I have:

FORM1 ---> FABRIK_DATA_1
FORM2 ---> FABRIK_DATA_2

But i want:

FORM1 -----------> FABRIK_DATA1
`-------> FABRIK_DATA3

FORM2 -----------> FABRIK_DATA2
`-------> FABRIK_DATA3

Why is because a client have one form per project, but he also want the forms to input data into one "larger databas" (read: an other table.)


Is this possible and if so, how?

Many thanks in advance.


Robert from Sweden
 
Hi Robert

If there is a relationship between the two database tables (ie one table has a field which references the primary key of the other table) then the answer is yes!

lets say you have a database table 'main_data' (primary key field called 'id') and another database table 'more_data'.

'more_data' has a field in it called 'main_data_id' which references which 'main_table' record it is joined to.

Make a fabrik table from the 'main_data' table and press 'apply'
Then under the data tab:
- press 'add' in the 'Joins' section
then in the form fields that appear select
- join type = 'inner'
- join from = 'main_data'
- join to = 'more_data'
- from column = 'id'
- to column = 'main_data_id'

press save
this will create a new group which contains elements bound to the fields in the 'more_data' table
When you save the form the data in those fields will be saved in the 'more_data' table, whilst the other fields (those from the original 'main_data' table) will be stored in the 'main_data' table

hth
ROb
 
Hi rob,

I am truly sorry to hassle you but I could really need some expert help right now.

When I'm trying to join the tables, I can only select the first table, but the other one just prints "Unable to connect".

I have searched the forum and read about the connection limit, so I contacted the webhost but they had no Idea what the fault was when I told them about the connection limit. They say they don't know about any sort of limit of that sort on MySQL.

Can you give me some tech pointers that I can refere them to finding the problem?



Best wishes

Robert
 
So just to confirm, you can create one table join, but if you try and create a second, you get the 'cannot connect' error?

-- hugh
 
I can create a new form and a new table but I can not create a new table from an other table to create a Join. If you would like I can give you login on pm so you can see for yourself, perhaps better that way? :)
 
We typically only do 'hands on' support for Subscribed members.

Maybe you could post a series of screenshots to show us exactly what you are trying to do, and where the error happens.

-- hugh
 
If there is a relationship between the two database tables (ie one table has a field which references the primary key of the other table) then the answer is yes!

lets say you have a database table 'main_data' (primary key field called 'id') and another database table 'more_data'.

'more_data' has a field in it called 'main_data_id' which references which 'main_table' record it is joined to.

Make a fabrik table from the 'main_data' table and press 'apply'
Then under the data tab:
- press 'add' in the 'Joins' section
then in the form fields that appear select
- join type = 'inner'
- join from = 'main_data'
- join to = 'more_data'
- from column = 'id'
- to column = 'main_data_id'

press save
this will create a new group which contains elements bound to the fields in the 'more_data' table
When you save the form the data in those fields will be saved in the 'more_data' table, whilst the other fields (those from the original 'main_data' table) will be stored in the 'main_data' table

hth
ROb

That was handy, I will use this now instead of an element with sub elements to resolve multiple values in Google Map Visualization.

Thanks, Frits
www.myfightclub.nl
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top