A Deep Dive into K2 Designer - Part 2 - Smart Views

AhmadAlbadri86
Nintex MVP
1 1 191

Low Code Automation & Nintex K2 Five Journey By Nintex MVP - A Deep Dive into K2 Designer - Part 2 - Smart Views

 

Smart Views are the core user interface, and medium of capturing user input to be sent to the DB via smart object, and is also where data retrieved from a DB can be visualized by the user. Smart Views are often referred to as sections of a form as 1 or multiple views make up a Smart Form.

 

Smart Views can be generated from smart objects, which generates fields representing each column within the smart object. In a Smart View, a field is referred to as a "Control".

The controls within a smart view maybe changed to suit the nature of a process, however, the compatibility of your control and its connected data source column data types are vital, as conversion errors may occur if values are passed between non compatible types e.g. Text to Number's or Boolean to Number etc..

 

There are 2 types of Smart Views. The "Item view" & the "List view".

 

Item View: The item view allows the capture of 1 entry per control per instance e.g. Capturing name of a requestor in an ID request form instance

 

List View: The list view allows the capture of multiple entries per control per instance e.g. Capturing names of visitors in a single visitor request form instance

 

In both Item and list views, are left side and top centered menus for configuring your views.

On the left side menus are 3 tabs: Toolbox, Fields & Methods

 

Toolbox tab is where new controls maybe be created or existing controls can be amended e.g. changing a text box to a drop down menu or creating a checklist control for multiple selection scenarios etc.

 

Fields tab is where any field from within the smart object can be dragged into the view for generating a new control

 

Methods tab outlines the method associated with your data source such as Create, Update, Read, List & Delete and creates button to execute the method chosen on your view

 

On the top centered menu are 4 tabs General, Layout, Parameters, Rules.

 

General is where you can amend the name, type & storage location of the view you are creating.

 

Layout is the canvas area where you can add/change controls from the tool box on the left. It is also the are where you may create an expression.

 

  • An expression is a means of data manipulation using a predefined function within K2 e.g. Identifying the year for date entries made by a user. Using a year function on the entries control made by the user, the expression value "Year" can be used in the view to populate the year for any entry. Predefined K2 functions expect specific input data, else conversion errors may occur. Hovering on top of the function may give insight to what the function is expecting as input.

 

Parameters tab allows you to create parameters within a view. A parameter is a container that temporarily stores data for a single instance of an object. It also is a mechanism to move data from a view or form to a workflow and vice versa. e.g. passing the Request Id of a specific request via a workflow

 

Rules tab is where a developer can start configuring the commands for the controls he/she has created. The rules are defined into 3 core sections "Events", "Conditions" & "Actions".

Events and Actions are mandatory for any rule to be created. Conditions are optional.

 

  • Events are the triggers to any action. E.g. "When a view is initializing" or "When a control on a view raises an event"
  • Actions are the functionalities that are enabled when an event occurs. E.g. "Execute a smart object method" or "Show a message"
  • Conditions sets the restrictions to when an action may happen after an event E.g. "If advanced condition is true" or "If parameter is specified"

 

K2 is rich in predefined rules a user can utilize for building functionality.

 

In the next article, i will be diving into the 3rd K2 building block "Smart Forms".
If you have enjoyed this read, kindly like, comment, tag others.

 

Cheers

 

 

1 Comment