Skip to main content
Kinetic Community

Using a Simple If Statement in a Parameter Field

How to implement a simple If statement in a parameter field for a handler.

Usage

The following piece of Ruby code will let you add an if statement into your parameter fields. This will allow you to have different values/data passed either farther along the task tree, or directly into fields on a Remedy form (or wherever you are passing data to).

Here is the basic structure of the if statement:

Conditional Statement ? True : False

An example where 'if question' is a radio button choice with Yes and No as the options.

<%=@answers['if question'] == "Yes" ? "You Said Yes": "You Said No" %>

If the answer is Yes, you get the text "You Said Yes" if No you get the text "You Said No".

Example

Here are some screen shots with the above code, using the Create Sample Incident Handler.

if_statement.jpg