Skip to main content

Hi All,

 

I'm VERY new to K2 and I'm having a great deal of difficulty getting this to work. I have two tables that both share a primary/foreign key in the form of an ID. I want to create a list view gets data from both tables using the ID.

 

I've got two SmartObjects (one for each table) and I really don't know where to go from here. Any assistance would be appreciated. I have looked around quite a bit and I can see references to composite SmartObjects however they don't really seem to address my question.

Hi FrogWallet

 

You can also use the list display control in your list view. Create an association between your 2 smartobjects (Add one by editing one of the smartobjects in the K2 designer). Once you have done this, when you drag the foreign key value onto the view, it will create a list display that is wired up to look at the associated smartobject. You can then select which field from the associated smartobject you want to see. If you want to see multiple fields, you can modify the display to show multiple fields, or you can add another column to the list and add another list display.

 

Have a look at K2 Help on List Display and SmartObject Associations


Thanks for the replies everyone!

Yes i'm using SQL but we're trying to use K2 to its fullest extent (right now we're sort of requirements testing) which means if possible avoid touching the database where possible (as there is an existing content management system ontop of it, we don't want to be creating new views/procedures for individual tasks if K2 can do without this requirement). To this end Andrew your advice was spot on. I've been able to achieve exactly what I wanted.

 

Thanks for the assistance.

 

Regards,

Frog


Reply