Instant Estimate +44(0)1908738254

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.

Save money and spend more time on priority work.

Book consultation

Let's choose, design and deploy a process automation solution for your business.

Find out more

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation

Automate where it matters most. Scale to solve challenges in every area

Find out more

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
22 October 2015

Displaying Data in a K2 SmartForms ListView using a DropDown

K2 worklists are key in any K2 Workflow application, and, a direct link from the K2 worklist to specific data in custom application databases do not always exist. As performance plays a big role, it is always important to load data as efficiently as possible.

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.


Free K2 Five Upgrade Review

In this example we will look at a scenario where we create our own custom worklist (displayed to the user) made up of both details from the K2 worklist and a custom application database. In the K2 worklist we store the username of the allocated user, however in our custom database we have a user table containing all the user details – but no direct link between the two.

To display a friendly name instead of the username, we need to use the worklist data to search our custom user table. When we have thousands of tasks it becomes very inefficient to do a lookup to the user table for every single task, same goes for fetching details from AD separately for each single task.

A very simple and efficient solution is to use a dropdown in the K2 SmartForm ListView, causing the user data to only load once and then displays the correct friendly name based on the K2 worklist data.

K2 SmartForms ListView

K2 SmartForms ListView – ListView Layout – 1

You can set up the dropdown to use a SmartObject returning a list method. Make sure you set the value to the property that will match the data returned from the K2 worklist, in this case the user’s FQN.

Choose from the SmartObject which properties you want to be displayed and make sure the dropdown settings allow empty select to cater for null values (otherwise the first record in the dropdown will automatically be displayed).

K2 SmartForms ListView

K2 SmartForms ListView – SMO Binding – 2

When you run your application you will see the list displaying a friendly name for the allocated user (from our custom database) instead of just the username (from the K2 worklist). You will also notice the data does not display the actual dropdown control but only the display label. If you change your list to an editable list the dropdown will display in the add / edit row.

K2 SmartForms ListView

K2 SmartForms ListView – Runtime – 3

This is a really quick and easy way to “combine” data with no link, with the added bonus of not having a negative impact on your performance.

Need further technical advice or support?