+44(0)1908 545 770
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
21 March 2015

How to display a hyperlink column in a K2 SmartForms ListView

Displaying a hyperlink column in a K2 SmartForms ListView

K2 has a hyperlink data type that can be used in both K2 SmartObjects as well as K2 SmartForm Views. This can be useful when you want to display a dynamic hyperlink.

For this example we will have a column in a K2 SmartForms ListView that displays a hyperlink to navigate to the K2 blackpearl’s ViewFlow of the specific activity’s K2 Workflow.

k2 smartforms hyperlink

1 – K2 SmartForms ListView Hyperlinks – SmartObject Designer

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

First, we add a new property to our K2 SmartObject with type Hyperlink.

K2 SmartForms ListView Hyperlinks - ServiceObject Method Bindings - 2

K2 SmartForms ListView Hyperlinks – ServiceObject Method Bindings – 2

This property of type Hyperlink will be bound to one of the fields returned from our datasource.

K2 SmartForms ListView Hyperlinks - SQL hyperlink format - 3

K2 SmartForms ListView Hyperlinks – SQL hyperlink format – 3

It is important that the value returned from SQL, to be used as the hyperlink, is returned in a specific format.

This format is the basic Xml for a standard hyperlink control: <hyperlink><link>http://some.url.com</link><display>Click Here</display></hyperlink>

K2 SmartForms ListView Hyperlinks - K2 SmartForms ListView Layout - 4

K2 SmartForms ListView Hyperlinks – K2 SmartForms ListView Layout – 4

We now go to our K2 SmartForms ListView and bind the column to our hyperlink SmartObject field.

K2 SmartForms ListView Hyperlinks - ListMethod Output Bindings - 5

K2 SmartForms ListView Hyperlinks – ListMethod Output Bindings – 5

On our List method we assign the output bindings accordingly (not physically necessary, if your SmartObject is mapped correctly K2 will automatically bind the method’s return values).

K2 SmartForms ListView Hyperlinks - Runtime K2 SmartForms ListView - 6

K2 SmartForms ListView Hyperlinks – Runtime K2 SmartForms ListView – 6

The final result – a K2 SmartForms ListView with a column specifically for dynamic hyperlinks.

More about K2 SmartForms

For more information about K2 SmartForms, or how to make any SmartForm project successful, please visit our SmartForm page on velocity-it.com.

Need further technical advice or support?