One-to-many in tableView in one line

Status
Not open for further replies.

piri314

Member
Hi,

I have a widgets table linked by one-to-many relations to several gidets tables.
Actually, the widgets table line is duplicate with each gidets value.
How it's possible to show all the values in only one line, separated by coma or any other sign, like the joined image?

The same question is true for the DetailsViewForm.

Thanks

 

Attachments

  • projets.gif
    projets.gif
    10 KB · Views: 213
  • projets.gif_thumb
    10.9 KB · Views: 190
This is a template customizing issue. As per the other thread I responded to, if you want to clone your chosen template to a custom one, we can start looking at how to help you do this.

-- hugh
 
Me, one more time, sorry

Finally, the values, coma separated (in the 3rd and 4th column), have to come from a many-to many relation, exemple with 1 many-to-many relation :

Table Project Table Project_disc Table Discipline
id_project (hide) id_project (datajoin to id_project) Discipline (culture areas)
title (...) id_disc id_disc
Discipline1, Discipline2...

And, of course, I would like the same result in the Project DeatailedViewForm.

Thanks for your help,
PIRINA
 
Pirina LATCHKOVA said:
Me, one more time, sorry

Finally, the values, coma separated (in the 3rd and 4th column), have to come from a many-to many relation, exemple with 1 many-to-many relation :

Table Project Table Project_disc Table Discipline
id_project (hide) id_project (datajoin to id_project) Discipline (culture areas)
title (...) id_disc (datajoin to id_disc) id_disc
Discipline1, Discipline2...

And, of course, I would like the same result in the Project DeatailedViewForm.

Thanks for your help,
PIRINA
 
Sorry I dont understand this question, do you have a page we can look at?
Have you succeeded in creating the table and joins?
 
Hi Rob,

Each project (item) from my table "Projects" covers few Disciplines listed in the table "Discplines" thanks to the linkage table "Projects_disc" : the many-to-many relation

Actually, Fabrik 1.04, offer to view or add this values trought few steps
- in the Project TableView : the filter "view" (Discipline)
> opens a new table with the filtered by project values
- in the Project TableView : the filter "add" (Discipline)
> opens a ViewForm to add the filtered by project values

What I would like :

1/ The Projects TableView: at the place of the "view" filter, I would like already to display the values for Discipline (in green), comma separated in one line, from the linkage table Projects_disc : where "Projects"_id_project="Projects_disc"_id_project (exemple Picture 1)

2/ The Projects ViewForm: I would like in the same form or page, to be able to add the values for "Disciplines" (I didn't undestand how to do that with the mambots in a static Joomla page) (exemple Picture 2)


3/ The Projects DetailedViewForm: I would like to display the values for Discipline, in one ligne, comma separated, from the linkage table Projects_disc : where "Projects"_id_project="Projects_disc"_id_project (exemple Picture 3)


I hope it's more clear...

PIRINA
 

Attachments

  • table_view_projets.gif
    table_view_projets.gif
    4.7 KB · Views: 182
  • table_view_projets.gif_thumb
    4.9 KB · Views: 152
  • add_projet_disc.gif
    add_projet_disc.gif
    29.2 KB · Views: 205
  • add_projet_disc.gif_thumb
    6 KB · Views: 183
  • DetailedFormView.gif
    DetailedFormView.gif
    26.4 KB · Views: 168
  • DetailedFormView.gif_thumb
    28.8 KB · Views: 171
ok so for 1 its a custom table template - what does you custom template look like?

for 2 - what don't you understand - what have you already tried? - the sytax for inserting the form is described in the mambot admin page - have you read that?

for 3 i dont think this is possible without some custom php code to achieve it

Cheers
Rob
 
Hi Rob,

1/ the Projects table template was replicate on the default one and it's in a the table/tmpl/projets

2/ I don't understand how 2 forms are linked : I tried 2 form_bots in the same page
"projects" + "projects_disc" :
- one time with a specific row : the Project_DetailedViewForm shows ok for the 1st one and is empty for the 2nd , even I know there is 3 disciplines_values for this project
{includeFabrikForm form=37 row=36 usekey=id_projet layout=viewTableRowDetails}
{includeFabrikForm form=51 row=36 usekey=id_projet layout=viewTableRowDetails}
and by the way, I have for the moment 175 projects ! do I have to make 175 static pages ? Please, non ;(

- only with the forms_ID
{includeFabrikForm form=37 usekey=id_projet layout=viewTableRowDetails}
{includeFabrikForm form=51 usekey=id_projet layout=viewTableRowDetails}
A have the "save" button 2 times, so I understand that they are not linked ?

3/ Can you help me with the custom php code ?

Thank you

PIRINA
 
1/ So how far have you got customising it ?

2/ Have you tried joining the table "projects" to "projects_disc" - this will give you one form that will save to the two tables.

3/ Sorry I'm flat out with lots of work, I'll ask Hugh if he has some time

Cheers
Rob
 
Rob Clayburn said:
1/ So how far have you got customising it ?
I just copied the files in another folder and renamed the .js script waiting for your instruction for to custom

2/ Have you tried joining the table "projects" to "projects_disc" - this will give you one form that will save to the two tables.

Ohhhh, yes. http://fabrikar.com/index.php?option=com_smf&Itemid=9&topic=1822.0

Anyway, I tried it, my problem is that in our case we are talking for just 1 many-to-many relation, for the exemple. The master table Projects have in fact 4 many-to-many :
projects_disc
projects_pays
projects_themes
projects_annu



3/ Sorry I'm flat out with lots of work, I'll ask Hugh if he has some time

Cheers
Rob


Merci
Pirina
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top