K2 Designer Item Reference


Badge +1

We are trying to build a form with multiple views and use the Item Reference feature in the workflow to bring back the data in all the views.  To date, only the data related to smartobject assigned to the Item Reference, brings back data, the other views are blank.  We associated the smartobjects using ID but when we save the form, the ID's do not match even though we execute the create methods in batch for each smartobject.


4 replies

Badge +3

As I understand it, the Item Reference feature in the workflow is a short-hand to executing a smart object method.

 

You can display the data in the form by for example, binding the smart object to the form or setting up a rule such as 'When the View is Initialized -> Execute the smart object Read method and passing the ID as the parameter. Then you can transfer the output properties of the smart object to your view controls.

Badge +7

Good Morning,

 

When you build your views, they have to have a Parameter ID built into them so you can pass that ID into the view.  I always build some sort of ID on the View level so that when the main form luanches, I can pass the main ID around to those other views.  Here is a dummy ID that is on one of my History views.  I can pass the ID of the Product into this parameter, of which I can pass into the view rules.14488i41C1D6260851991F.png

Badge +1

Thanks for the information.  I built my views so that the ID is in sync across each view/smartobject/table (Two of them).  I can retrieve the information independent of the workflow but when I use the Item Reference feature and specify the main smartobject, the data for the second view is not retrieved from the table.

Badge +1

I have basing my development on this http://help.k2.com/en/KB001367.aspx which starts to explain how to use Item Reference with multiple views.  Does anyone have a more detailed and updated version of this knowledge bulletin?  A full training example with multiple views on a form (i.e. Sales Order Header and Detail) would be great.

Reply