5. Create the Expense Claim Header SmartObject
There are two more SmartObjects needed for the Expense Claim application: Expense Claim Header (to store the "main" information about the expense claim being submitted) and Expense Claim Details (to store the "line items" for the expense claim being submitted). Both SmartObjects are SmartBox SmartObjects, which you will create from scratch.
The Expense Claim Header SmartObject contains information such as the employee name, claim and approval dates, claim status and comments. The Expense Claim Details SmartObject contains the line items for the claim. You can enter as many line items as you need in the details section. The header information is bound to the details information by a common ID property. This creates a header-details, or parent-child record relationship, where you have one parent record and potentially many child records.
Once you have completed the header and details SmartObject builds, you will begin constructing the views and form for the application.
-
Switch back to K2 Designer. Create a new SmartObject from the SmartObjects category. Name the SmartObject Expense Claim Header and make sure it is a SmartBox SmartObject. Use the table below for the data fields. Finish the SmartObject after entering the data fields.
Property Type Notes Employee Name Text Stores the display name of the user who submitted the request. Request Title Text This property provides a semi-unique value that you will use for the workflow Folio value. The Folio comes into play when you work with reports. Submit Date Date This is the date you submit the expense claim request. Total Amount Decimal This is the total expense claim request amount. Request Status Text The workflow updates this property so that you know where the workflow progression is at any given time. Requester Comments Memo This is a text area where the user can enter any comments regarding their expense claim request. Approval Date Date This is the date the claim approver approves the request. The workflow updates this property. Approver Comments Memo This is a text area where the approver can enter any questions or comments they have about the request. Finance Process Date Date This is the date the finance processor completes their task. The workflow updates this property. Finance Processor Comments Memo This is a text area where the finance processor can enter any comments they have about the request. Workflow ID Number The workflow updates this property with the ID of the current workflow. This allows us to "join" the expense claim data with the workflow instance reporting data later on. - You will begin by creating the first of two SmartBox SmartObjects. Switch back to K2 Designer. (It should be a tab in your browser. If not, then launch K2 Designer from the start menu or from a URL provided to you by your Nintex K2 administrator.) Right-click the SmartObjects category and select New SmartObject.
- On the GENERAL settings page, Name the new SmartObject
Expense Claim Header
then confirm the SmartBox option as the Type. Click CREATE. - Next, you will manually add the properties for this data source. In the Expense Claim Header box, click Add. Enter all the properties from the table below. Click OK to save the properties to the SmartObject.
Property Type Notes Employee Name Text Stores the display name of the user who submitted the request. Request Title Text This property provides a semi-unique value that you will use for the workflow Folio value. The Folio comes into play when you work with reports. Submit Date Date This is the date you submit the expense claim request. Total Amount Decimal This is the total expense claim request amount. Request Status Text The workflow updates this property so that you know where the workflow progression is at any given time. Requester Comments Memo This is a text area where the user can enter any comments regarding their expense claim request. Approval Date Date This is the date the claim approver approves the request. The workflow updates this property. Approver Comments Memo This is a text area where the approver can enter any questions or comments they have about the request. Finance Process Date Date This is the date the finance processor completes their task. The workflow updates this property. Finance Processor Comments Memo This is a text area where the finance processor can enter any comments they have about the request. Workflow ID Number The workflow updates this property with the ID of the current workflow. This allows us to "join" the expense claim data with the workflow instance reporting data later on. - Click FINISH to save and exit the SmartObject.
- You will begin by creating the first of two SmartBox SmartObjects. Switch back to K2 Designer. (It should be a tab in your browser. If not, then launch K2 Designer from the start menu or from a URL provided to you by your Nintex K2 administrator.) Right-click the SmartObjects category and select New SmartObject.
Review
In this step, you created the first of two SmartBox SmartObjects. SmartBox SmartObjects are Nintex K2-provided data sources, where Nintex K2 creates a table on your behalf in the K2 database. Properties are manually defined, such Employee Name (Text) and Submit Date (Date). SmartBox SmartObjects contain default Nintex K2 methods such as create, delete and update. In this application, you are creating two SmartBox SmartObjects: header and details. The header acts as the "parent" record and contains basic information such as Employee Name and Submit Date. The details SmartObject acts as the "child" records and contains the expense claim line items, and we will create this SmartObject next.