+44(0)1908738254
YOUR EXPERT RPA PARTNER

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

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

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

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

Find out more
TRANSFORM YOUR BUSINESS

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

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

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

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

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
10 September 2015

K2 SmartForms ListView sorting – How to

Sorting may be one of the simplest concepts in any application, however, if you don’t understand the prioritising of sorting within a K2 SmartForms ListView, you can find yourself running in circles to apply the correct sorting.

First we will discuss the different ways to apply sorting on a K2 SmartForms ListView after which we will discuss the K2 prioritising of these different sorting methods.

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

The first option is server-side sorting by either sorting within your SQL stored procedure or your service method.

k2 smartforms listview sorting

K2 SmartForms Sorting – 1

The second option is to apply sorting from the ListView settings. You can find these options from the ListView layout by clicking on the blue cogwheel.

K2 SmartForms Sorting – 2

In the “Sort” section select configure.

K2 SmartForms ListView Sorting - 3

K2 SmartForms ListView Sorting – 3

You can choose items for the ListView to sort by from the SmartObject you selected when you created the View. If you add more than one item the sorting will be applied for both ordered from the top. You can also choose the sort order – ascending or descending.

K2 SmartForms ListView Sorting - 4

K2 SmartForms ListView Sorting – 4

The third option is to apply sorting whenever you call the method that loads the list data. This option means that you can have a different sorting for every different list load.

K2 SmartForms ListView – 5

On the list load rule click on configure to set up the sorting.

K2 SmartForms ListView Sorting - 6

K2 SmartForms ListView Sorting – 6

You can choose items for the ListView to sort by from the SmartObject you selected when you created the View. If you add more than one item the sorting will be applied for both ordered from the top. You can also choose the sort order – ascending or descending.

K2 SmartForms ListView Sorting - 7

K2 SmartForms ListView Sorting – 7

The order in which the sorting will be applied within the K2 SmartForms ListView is:
1. List load method sorting (Option 3)
2. ListView options sorting (Option 2)
3. Server-side sorting (Option 1)

It is important to note that your server-side sorting will be overridden should you have any K2 sorting (option 2 or 3 ) set up. You should also always ensure that your SmartObjects are set to the correct datatype to avoid incorrect sorting since dates, times and numbers will not sort correctly if the datatypes are set to text for example.

Need further technical advice or support?