Comboboxes from k2 Smartobjects
In a previous blog post we explored how to create various relationships between your SmartObject entities. In this post we will expand on the usefulness of having defined these associations in the first place.
K2 Automated Testing Software
rnBenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
Lets just look at our basic data setup again before we continue. Basically a product is associated with a specific Line of business, while a line of business can be associated with many products.
Now we would like to create a screen from where we would like to add a new product to the system. To do this we have to choose a line of business to which the product needs to be added. The basic screen layout is as follows.
To get the combobox on this screen to display database driven data, you usually would have had to perform a few steps, as listed below.
1. Drag a combobox control onto the designer.
2. In the data source section of the combo box properties define the data source as follows:
3. Make sure the the following rule is added to ‘When the view executed Initialize’.
If you have however already configured the association between the LOB and product Smart Objects it however becomes as simple as dragging the LobId field from the right hand side ‘Fields’ tab onto the design canvas and all the rules and setup will automatically be performed for you.
This become especially usefull when creating list views with editable combobox fields. The more times you use the field, the more time it saves if you just define the associations correctly from the get go.