Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > For More Information View modes: 
User avatar
Member
Member
ctaleck IPAGlobal - 3/19/2009 10:07:55 AM
   
For More Information
I would like to create a feature called "For More Information" and I thought using Custom Tables would be best suited. However, my particular need requires a joined view of two tables which does not seem possible?

Here is my example:

Contacts table
ItemID
Name
Email
Phone

ContactsDocuments table
ItemID
ContactsItemID [links to Contacts table above]
DocumentItemID [links to CMS_Document table]

Then I would like to list all the contacts on each document I create using the Data List for a Custom Table. But I need to join these two tables so I can get the Name for the current DocumentID being displayed. The reason for the join is that a contact can be represented on more than one Document.

What will get this working?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 4/1/2009 8:04:48 AM
   
RE:For More Information
Hello,

unfortunately there is no native support for foreign keys between custom tables and system tables. You could eventually try to create Contacts table as custom document type, create particular contacts as documents and express relationship using Related documents feature: http://devnet.kentico.com/docs/devguide/related_docs.htm

You could display data of Contacts documents related to current page using CMSRepeater web part then.

You could also express relationship just by putting particular Contacts documents under appropriate page in content tree.

Best Regards,

Martin Dobsicek