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.

SmartBox SmartObjects are product-provided storage. The product creates a table in the K2 database on your behalf. You can specify the properties (think columns in a table) along with the methods. Methods are the protocols you use to manipulate data (create, save, delete, etc.). Behind the scenes, the product creates the programming and logic (code) necessary for connecting to and interacting with the SmartBox data source.

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.

  1. Switch back to the 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.
    PropertyTypeNotes
    Employee NameTextStores the display name of the user who submitted the request.
    Request TitleTextThis 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 DateDateThis is the date you submit the expense claim request.
    Total AmountDecimalThis is the total expense claim request amount.
    Request StatusTextThe workflow updates this property so that you know where the workflow progression is at any given time.
    Requester CommentsMemoThis is a text area where the user can enter any comments regarding their expense claim request.
    Approval DateDateThis is the date the claim approver approves the request. The workflow updates this property.
    Approver CommentsMemoThis is a text area where the approver can enter any questions or comments they have about the request.
    Finance Process DateDateThis is the date the finance processor completes their task. The workflow updates this property.
    Finance Processor CommentsMemoThis is a text area where the finance processor can enter any comments they have about the request.
    Workflow IDNumberThe 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.
    Expense Claim Header SmartObject
    1. You will begin by creating the first of two SmartBox SmartObjects. Switch back to the Designer. (It should be a tab in your browser. If not, then launch the 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.
      New SmartObject
    2. On the GENERAL settings page, Name the new SmartObject
      Expense Claim Header
      then confirm the SmartBox option as the Type. Click CREATE.
      Create SmartBox SmartObject
    3. 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.
      PropertyTypeNotes
      Employee NameTextStores the display name of the user who submitted the request.
      Request TitleTextThis 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 DateDateThis is the date you submit the expense claim request.
      Total AmountDecimalThis is the total expense claim request amount.
      Request StatusTextThe workflow updates this property so that you know where the workflow progression is at any given time.
      Requester CommentsMemoThis is a text area where the user can enter any comments regarding their expense claim request.
      Approval DateDateThis is the date the claim approver approves the request. The workflow updates this property.
      Approver CommentsMemoThis is a text area where the approver can enter any questions or comments they have about the request.
      Finance Process DateDateThis is the date the finance processor completes their task. The workflow updates this property.
      Finance Processor CommentsMemoThis is a text area where the finance processor can enter any comments they have about the request.
      Workflow IDNumberThe 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.
      New SmartObject
    4. Click FINISH to save and exit the 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.

Next Step: 6. Create the Expense Claim Details SmartObject