Instant Estimate +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
27 February 2015

Changing K2 SmartForms ListView Column Visibility

Changing the visibility of a K2 SmartForms control is usually pretty straightforward, but when it comes to the visibility of a K2 ListView Column control, the solution might not be that obvious.  This blog explains how to solve this problem using K2 SmartForms rules.

K2 SmartForms ListView Column Visibility - ListView Layout - 1 K2 SmartForms ListView Column Visibility – ListView Layout – 1

K2 Automated Testing Software

rnBenchQA 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 K2 SmartForms ListView control consists of different properties that all make up the physical ListView Column, and is each reachable as a separate control i.e. Column, Header and Body.

K2 SmartForms ListView Column Visibility - ListView Column Properties - 2 SmartForms ListView Column Visibility – ListView Column Properties – 2

One of the options available to change a K2 SmartForms’ control’s properties can be found in the Control Interaction submenu on the Actions tab. This option works perfectly well when changing a control’s visibility and/or other properties, but the ListView Column control’s properties are not exposed in this option. You only have access to the Body, Header etc. properties and as a result can’t change the visibility of the column as a whole.

K2 SmartForms ListView Column Visibility - K2 SmartForms Control Interaction - 3 K2 SmartForms ListView Column Visibility – K2 SmartForms Control Interaction – 3

To specifically gain access to the K2 SmartForms ListView Column control’s visibility property, you have to add the Show / Hide a View control action in the Visibility submenu.

K2 SmartForms ListView Column Visibility - K2 SmartForms Control Interaction - 4 K2 SmartForms ListView Column Visibility – K2 SmartForms Control Interaction – 4

The rule is then configured and the K2 SmartForms ListView Column control’s visibility will be modified as per the K2 SmartForms rule specification.

K2 SmartForms ListView Column Visibility - K2 SmartForms Rule Specification - 5 K2 SmartForms ListView Column Visibility – K2 SmartForms Rule Specification – 5

This technique is useful for scenarios where the K2 ListView control is re-used by various K2 SmartForms, but based on the context of the data, columns need to be displayed or hidden.  Sometimes the runtime visibility property needs to be updated to fulfil this requirement, and this done using the method described in this post.

About Velocity IT

Velocity IT is a UK based IT company that are business process architects and K2 masters. With over 15 years’ K2 design and development experience, we are the forefront of K2 solution design and implementation. Our K2 solutions have a user base of over 300,000+ users worldwide. Please visit velocity-it.com for more help and information.