Using K2 SmartForms expressions is a very simple solution to certain challenges faced when creating a K2 SmartObject with the K2 SmartObject Service Tester. When you create a K2 SmartObject using this method, you do not have access to the SQL Create, Read, Update and Delete (CRUD) methods. When one or more of your input parameters need to be calculated dynamically, you either have to create a new SQL Stored Procedure and add it to the K2 SmartObject, or you can create an expression and use it as an input parameter.
K2 Automated Testing Software
BenchQA 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.
It is important to note that you can click on any control to access the general properties to create an expression, but you will not assign that expression to the control.
When you create your expression, you have access to a range of operators ranging from K2 data manipulation, K2 list aggregators, K2 logical, text etc. These can be found on the bottom of the expression view under the Operators tab in the K2 SmartForm designer. You also have access to all the K2 SmartForms controls on your view(s) and form as well as the K2 SmartObject associated with view(s). These can be found under the Context tab.
After you have created your K2 SmartForm expression, you can configure the default method created by the K2 SmartObject Service Tester (in this example the Create method) and simply drag the expression into the desired input field. This field will now have the calculated value as configured in the expression.
This is a great tip to avoid using temporary K2 SmartForm parameters, K2 Data Labels or K2 SmartForm input controls as a source for a SmartObject input mapping.