Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > HOw to define custome table, document type and ForeignKey? View modes: 
User avatar
Member
Member
eagleag - 6/23/2010 9:36:57 AM
   
HOw to define custome table, document type and ForeignKey?
HI,

Is there a way to define a foreign key in custom tables and document types throw the kentico system?

Or create relationships?

Thanks:)



User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2010 1:35:53 AM
   
RE:HOw to define custome table, document type and ForeignKey?
Hi,

Regrettably this is not possible through the CMS interface. You need to ensure the relationships between tables in SQL server DB as usual.

Best regards,
Juraj Ondrus

User avatar
Member
Member
eagleag - 6/24/2010 2:17:26 AM
   
RE:HOw to define custome table, document type and ForeignKey?
User image

The issues is the City custom table shows the ID of the foreign key (ID state), which is meaningless to someone editing or updating the custom table. Can we show the "State" name also in the city's custom table without actually saving the state name to db? (like creating colums on the fly: select coluName as 'tempColu')

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/25/2010 3:04:19 AM
   
RE:HOw to define custome table, document type and ForeignKey?
Hi,

You can create custom editing, view and list pages for custom tables and set them for particular custom table in the UI - Site Manager -> Development -> Custom tables -> General tab.

You can create custom view in the DB which you will use on the custom editing page, so it will display values as you need.

Best regards,
Juraj Ondrus