Skip to main content
Kinetic Community

Check Box Events - Insert and Remove

Import Files
Service Item CheckboxEvents.zip
KURL Checkbox Events.rb
How to use the Insert and Remove Events when using a Check Box Question.

Description

A common question that I am asked is how to use an Insert and Remove Event when using a Check Box question.

In order to accomplish this you will need to build Events to both Insert and Remove your "extra" questions based on what is Clicked in the Checkbox question.  Because Checkbox questions work a little differently you will need to add some extra syntax into your Fire Event If Statements.  See below:

Event:  Click
Action:  Insert and Remove
Event Name:  Insert LAN Info
Fire Event If:  obj.checked==true && obj.value== "LAN"
Insert:  LAN Info


Event:  Click
Action:  Insert and Remove
Event Name:  Remove LAN Info
Fire Event If:  obj.checked==false && obj.value== "LAN"
Remove:  LAN Info

As I will assume that you also have the need to make these questions Required once these different values are checked I have created those Events too:


Event:  Click
Action:  Required and Optional
Event Name:  Require LAN Info
Fire Event If:  obj.checked==true && obj.value== "LAN"
Required:  LAN Info


Event:  Click
Action:  Required and Optional
Event Name:  Optional LAN Info
Fire Event If:  obj.checked==false && obj.value== "LAN"
Optional:  LAN Info

 

Please note that if you are using Kinetic Request version 5 or greater you do NOT need to build in the Required and Optional Events.  You will instead be able to Check the "Also require" or "Also make optional" check boxes on the Insert and Remove Events.  As the Service Item was created before version 5 and because I LOVE the "Also require" and "Also make optional" check box feature I wanted to leave it in to show you how you can greatly reduce your number of Events.  In the example attached to this posting there are a total of 16 Events.  If you have version 5 or greater you would only need 8.

As seeing this type of functionality in action always helps I have attached a Service Item called Checkbox Events to this posting.