Multipage - second table data in accordion tab

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Fakiro82
User
Posts: 108

Multipage - second table data in accordion tab

Post by Fakiro82 »

Hi,
I have 2 tables, the first table with some data and the second table with other data that are in join to the first table. I need to see the second table data in accordion tab.
For example, the attachment in join with the some ID.
I hope I explained.

Thank you so much,
Andrea.


mobhar
User
Posts: 11709

Post by mobhar »

  1. Please post your tables schema including some records in them for more discussion.
  2. What did you mean by "I need to see the second table data in accordion tab."? In which page?

Fakiro82
User
Posts: 108

Post by Fakiro82 »

For example:

First table
ID Description Value
1 AAAAAAAAA 10,00
2 BBBBBBBBB 20,00
3 CCCCCCCC 30,00
4 DDDDDDDD 40,00
5 EEEEEEEEE 50,00

Second Table
ID Attachment or Description
1 Attachment_1
1 Attachment_2
2 Attachment_1
2 Attachment_2
2 Attachment_3
3 Attachment_1
4 Attachment_1
4 Attachment_2
5 Attachment_1
5 Attachment_2

In the view of the first table record I can insert in accordion tab the data of column "value" (first table), but how can i do to add a new accordion tab, always in the same view (first table), with the data of the column "Attachment or Description" (second table)?

I hope I explained and sorry for my little english.

Thank you,
Andrea.


mobhar
User
Posts: 11709

Post by mobhar »

Have you already tried to make the "Master/Detail" relationship between first table and second table? If not, please read "Tutorial - Master/Detail" from PHPMaker Help menu.


Fakiro82
User
Posts: 108

Post by Fakiro82 »

Hi,

I've already tried with master/detail but not work.

so is not possible to insert in accordion tab data from second table?

Thank you,
Andrea.


mobhar
User
Posts: 11709

Post by mobhar »

Then try to create a Database View that joins those two tables, and then setup your desired fields by adjusting the value of "Page No." from "Fields" setup -> "General" in order to locate them into another Tab/Accordion component.

Please read "Field Setup" from PHPMaker Help menu for more information.


Fakiro82
User
Posts: 108

Post by Fakiro82 »

Hi,
i don't need a view (because i can't modify detail of master record).
I need to see the details record of the master record in accordion tab into view of master record.

I hope I explained,
thnak yuo so much,
Andrea.


sangnandar
User
Posts: 980

Post by sangnandar »

Not quite understand your case but if your intention is just "to see table_2 value from table_1" you can

  • add custom field at table_1
  • set expression (select ... from table_2 where ...)

Fakiro82
User
Posts: 108

Post by Fakiro82 »

Hi,
now it's work.
Sorry,
Andrea.


Post Reply