Working with Join

Status
Not open for further replies.

braga

New Member
I have three tables in a database of Mysql that I want to visualize and to modify via web by Fabrik.
First Table: IDFiscale - Name - Address - Telephone etc...
Second Table: IdContract - IDFiscale - number - Date Effect - Date proceeds - Total - IdPayment
Third Table: IdPayment - Kind of Payment

I have inserted in the table Contract the inners joins between IDFiscale-IDFiscale and IdPayment-IDPayment

I have noticed that Fabrik has generated new groups like "Address - [ joined to Contract]" and "Kind of Payment - [joined to Contract]... and the same thing in the Elements

Now I want to visualize in the web page only part of the fields from the tables for ex. the Name -Date effect- Date Proceeds - n.contract - Total - Kind of payment.
I want also search by name and number of contract and write in some fields like total and change Kind of payment.... and so to bring all to the mainmenu.

How do I construct the form necessary to this visualization? I have to Use the "elements - joined" or the others? Can an element be put in more groups, is there some example in order to help in this case? If i change a elements in a group I modify the other view that I have made? Thanks a lot I'm a little confused
 
hi

Each time you join a table to your main fabrik table, a new group, called for example "Address - [ joined to Contract]", is created.
In this group new elements are created.

Each of these groups is automatically assigned to the main table's form, so will work just as any normal group does. Forms can have multiple groups attached to them. So the form is already created for you and you just need to edit the elements to suite your needs.

So if you wanted to hide the element "Date Effect" in the table view, when it is located in the group "Address - [ joined to Contract]":

1.View all elements
2.filter them by the group "Address - [ joined to Contract]".
3.Click on the element labelled "Date Effect" to edit it
4.Select the "table settings" tab and uncheck "show in table view".


Or if you wanted to not show them in the form, you can simply unpublish them, or set their access levels to "nobody"

Elements can only be assigned to one group.
 
Thanks therefore I have made one step in ahead I have executed it.
I would like to make a search form, I find the group Contracts, Address and Kind of payment, everyone of they has its elements
I wish to make a search for following fields: Name, N. Contratto and to show and to modify , Date Effect - Date proceeds - Total and Kind of Payment.
But the Elements have their group and not task of being able to move it in other group, the only thing that remains is to make a copy of the fields is it true?
I did so, after, I have changed their name and I have inserted them in the new group name "search", and so I create a new Form "searchform", that I wanted to table shape but nothing of that I have obtained......Some example to follow or a video tutorial to know it?
??? acch
Thanks for any help.
 
On a little side note, another handy change to the "Join" function of the element would to allow the join to be rendered as a textfield. Right now it's a radio button or dropdown, but if you were already filtering the form or field by let's say - WHERE ID = foo, and you only wanted to show that one record in the join field a text field would be perfect.

In a lot of cases you could forgo having to add the table, groups and elements.

So under Render join as just add "textfield" as an option

Janie
 
Yeah, I've considered that.

Would you want it to limit the result to just the most recent, or put all the results in the field, comma separated?

-- hugh
 
I want to filter dbase like limitt the records and to maintain the fields in order to carry out eventual modifications, edit fields
 
hi

@Janie - what would you expect to happen when someone edited this field. Would it update the joined record (in which case all other records pointing to it would also be updated) or create a new record? If you just want to display the text and not allow people to edit it, then you can set the elements acces level to nobody, which will then show the drop down value as plain text.

@Alessandro - does this faq help - http://fabrikar.com/index.php?option=com_easyfaq&task=cat&catid=11&Itemid=30#faq14
 
Saving of the joined fields?

Hi,

I use the fabrik default form for displaying and editing a table together with a joined table. The data of both tables are displayed correctly in the user form.
But on saving only the fields of the base table are getting saved. The data of the table I join to are not getting saved.
Should this be possible or not?

The elements of the joined table are defined explicitly in the backend in the category "Access" so that editing is allowed for the type of user I test with.

Roland
 
Hey guys, can we try and keep topic hijacking to a minimum?

If what you are posting is not directly related to the issue the topic starter raised, please post a new topic. Otherwise it just gets impossible for us to keep track of discussions and issues - especially given SMF's lack of threading support.

You'll find you tend to get better response if your 'thread' is a separate topic, with a clearly descriptive Subject, rather than one of several threads buried within a (more or less) unrelated topic.

-- hugh
 
Hi Rob, hi Hugh,

@Rob: right now I can't give you access to a page because I can't put it online.
It seems that I corrupted my fabrik system with updating from the SVNs. Probably I didn't get all necessary files from the SVNs. I tried to update to 289 as there was the message "fixed: table join data not always saving."
For my actual problem I will open a new topic and come back here if necessary.

@Hugh
I really don't want to spoil the topics.
Concerning this subject "working with join" I felt good in this topic because my problem is to save a joined table.
I got response here but I did not get response when I opened a separate topic for my problem almost a month ago. Please see here: http://fabrikar.com/index.php?option=com_smf&Itemid=9&topic=1239.0

Roland
 
Support is pretty much done on a "best effort" basis, with actual bug reports taking priority over general "usage" issues.

We do our best to respond to everything, but sometimes posts slip thru the cracks. Basically, once your post moves on to Page 2, it's gone from my world, unless you bump it (reply to it yourself, so it moves back to the top of page 1) to get our attention. If necessary, keep bumping it with increased frequency till you get a response.

The thing is, I see a thread from someone I know I've resolved, it goes to the bottom of my "attention heap". I'll check in on it when I can if I see new responses, but I concentrate on new threads with new issues first.

Obviously, you can post wherever you want. I'm just letting you know the best way to get a response.

-- hugh
 
Thanks Rob, I watched the instructions on the link that you have given to me.
Now I acquired familiarity in working with the tables and with the joins and all it is perfect, and therefore it is not so complicated.
Now I must resolve the problem of the sum of the numbers in a column. How do you do with a fabrik?
But this is an other history and still opens a new form, Thanks again
 
hi you can sum a columns data by editing the corresponding element, selecting the "table settings" tab, under the "Table Calculations" section select "yes" for the "Sum the column total" option
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top