Skip to main content

Hi K2 guru,

 

I got a form consists of two views,  top one is item view with proj details,  2nd one is List view allow user to add some suggestion (can be multiple line),  at the end of the form there is a Submit button to save all the fields from view 1 and view 2

Note :-   View 1 and View 2 have their own smart objects

 

Trying to pass one of the field data Proj_ID to View 2 so that the two smartobjects are linked,  that is SMO1 is parent and SMO2 is child

 

We were trying to put all the rules 

- when Form is clicked

  item on View1  view, execute the Create methond (configure)

  item on View 2  view, excecute the Create method for all the items that have been added (configure)

 

I create a Sugg_ID in view 2 SMO,  mapped to Proj ID

when run somehow the Proj_ID that input was not passed to View 2 Sugg_ID

 

Is my method correct ?  or is there any other better method

 

Thank you in advance

 

 

 

This can be handled in several ways. In your rule configuration, if you are running the two create rules one after another, you can add an output on your View 1 create rule to push the Proj_ID value to a parameter on the Form, which is then used as an input for your Sugg_ID on the View 2 create rule.


 


Alternatively, you can look into linking the create methods in a new composite SmartObject that will house the data all in one location. More information about composite SmartObjects and a few examples of how they are used can be found in the following documentation:


http://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#Create/SmartObjects/CompositeSmartObjects.htm


http://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#How-Tos/SmartObject-Composite/SmartObjectBasicComposite.htm


 


Specifically, I believe the following example is similar to what you are trying to acheive:


http://help.k2.com/onlinehelp/K2Five/UserGuide/5.3/default.htm#How-Tos/ManyToManyCheckBoxList/MayToManyCheckBoxList.htm


 


Cheers,


Jered


 


[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]


There are so many different ways to do this.  

I traditionally on the 1st View Create method I will put in the Output Tab grab the ID from the SMO and put it into a Parameter or a datalabel on the 2nd View and then when you do the Create on the 2nd View put that label into the Create statement.

 

I've also had success linking them in the SMO as a Parent / Child type relationship. 

 

Hopefully you get it to work.


Hi Sir, able to provide me a quick step on how to grab the ID (from 1st item view) and store as parameter/datalabel in the output tab, and how the 2nd List view grab the store ID and place in the ID field of 2nd List view

or can you email me some screencapture of your mockup

Thanks a million

Hi Jered and other K2 Guru

 

Any tips / suggestion on my scenarios ?

 

Attached doc on what we want to achieve


Jered and all

 

manage to use form parameter (created a Pass_ID) to store the save ID,  then add a rule in the ADD of List view to transfer the Pass_ID to the field in List view

 

Thank you All


Reply