Skip to main content
Kinetic Community

Events

An event can be added to a page, section, text, or question element by using the event function.

Event Flags

The :before_submit, :load, :submit, :custom_event, :attach_menu, :blur, :change, :click, :focus, :keyup, :mouse_out, :mouse_over, :set_fields_return flags are used to configure the event’s trigger. One of these flags is required for all events.

The :custom_action, :hide_show, :insert_remove, :populate_menu, :read_readwrite, :required_optional, :set_fields_external, :set_fields_internal, :lock, and :unlock flags are used to configure the event’s action. One of these flags is required for all events.

The :disabled flag will set the event's status to disabled and it will not fire when it is in this status.

Event Options

The :fire_if option configures the fire if condition of the event.

The :description option configures the description of the event.

Classification Events

A classification event can be created by using the event function and including one of the following flags: :hide_show, :insert_remove, :read_readwrite, :required_optional. In addition to using the event function, classification events require the use of the target function inside the code block passed to the event function.

Classification Event Flags

The :also_require flag (Kinetic Request 5.0) configures the show or insert classification event to also require the event targets.

The :also_make_optional flag (Kinetic Request 5.0) configures the hide or remove classification event to also make the event targets optional.

Classification Event Functions

The target function (Chapter 10).

Creating Classification Events

event "Hide Show Event",
  :hide_show,
  :click,
  :fire_if => "1==1" do
  target "Hide Target Question",
    :question,
    :hide
  target "Show Target Question",
    :question,
    :show
end

The hide/show classification event will hide a question element and show another question element.

event "Insert Remove Event",
  :insert_remove,
  :click,
  :fire_if => "1==1" do
  target "Insert Target Question",
    :question,
    :insert
  target "Remove Target Question",
    :question,
    :remove
end

The insert/remove classification event will insert a question element and remove another question element.

event "Required Optional Event",
  :required_optional,
  :click,
  :fire_if => "1==1" do
  target "Required Target Question",
    :question,
    :required
  target "Optional Target Question",
    :question,
    :optional
end

The required optional classification event will make a question element required and make another question element optional.

event "Read Only Read Write Event",
  :read_readwrite,
  :click,
  :fire_if => "1==1" do
  target "Read Only Question Target",
    :question,
    :readonly
  target "Read Write Question Target",
    :question,
    :readwrite
end

The read only/read write classification event will make a question element read only and make another question element read write.

Set Fields Internal Events

A set fields internal event can be created by using the event function and including the :set_fields_internal flag. In addition to using the event function, set fields internal events require the use of the field_map function inside the code block passed to the event function.

Set Fields Internal Event Functions

The field_map function (Chapter 11).

Creating Set Fields Internal Events

event "Set Fields Internal",
  :set_fields_internal,
  :change,
  :fire_if => "1==1" do
  field_map "Requested By",
  "<FLD>Requested For</FLD>"
end

The set fields internal event is for a question element. When the value of the question is changed, the event will populate the Requested By question with the answer value of the Requested For question on the same form.

Set Fields External Events

A set fields external event can be created by using the event function and including the :set_fields_external flag. In addition to using the event function, set fields external events require the use of the data_request and field_map functions inside the code block passed to the event function.

Set Fields External Event Flags

The :use_get_entry flag (Kinetic Request 5.0) configures the set fields external event to use get entry.

The :null_on_no_match flag (Kinetic Request 5.0) configures the set fields external event to set the target field to null on no match.

The :use_bridging flag (Kinetic Request 5.1) configures the set fields external event to use a bridged resource instead of a simple data request.

Set Fields External Event Functions

The field_map function (Chapter 11).

The data_request function (Chapter 12).

The bridged_resource function (Kinetic Request 5.1) configures a bridged resource to be used.  See Bridged Resources for details and examples regarding bridged resources.

Creating Set Fields External Events

event "Set Fields External",
  :set_fields_external,
  :click,
  :fire_if => "1==1" do
  data_request "Employee",
    :sort_fields => "",
    :max_entries => "10",
    :sort_order => "Ascending",
    :qualification => "1=1"
  field_map "Requester Name", "<FLD>Name</FLD>"
  field_map "Requester Address", "<FLD>Address</FLD>"
end

The set fields external event is for a text element. When the text element is clicked the event will populate the Requester questions with data from the form specified.

Populate Menu Events

A populate menu event can be created by using the event function and including the :populate_menu flag. In addition to using the event function, populate menu events require the use of the target and data_request functions.

Populate Menu Event Flags

The :use_bridging flag (Kinetic Request 5.1) configures the populate menu event to use a bridged resource instead of a simple data request.

Populate Menu Event Functions

The target function (Chapter 10).

The data_request function (Chapter 12).

The bridged_resource function (Kinetic Request 5.1) configures a bridged resource to be used.  See Bridged Resources for details and examples regarding bridged resources.

Creating Populate Menu Events

event "Populate Menu",
  :populate_menu,
  :mouse_over,
  :fire_if => "1==1" do
  data_request "Employee",
    :label_field => "Name",
    :value_field => "Id",
    :sort_field => "Id",
    :max_entries => "10",
    :sort_order => "Ascending",
    :qualification => "1=1"
  target "Select User"
end

The populate menu event is for a section element. When the cursor is moved over the section element the event will populate the menu of a question element.

Custom Action Events

A custom action event can be created by using the event function and including the :custom_action flag. In addition to using the event function, custom action events require the use of the custom_code function.

Custom Action Event FlagsEdit section

The :use_bridging flag (Kinetic Request 5.1) configures the custom action event to use a bridged resource instead of a simple data request.

Custom Action Event Functions

The data_request function (Chapter 12).

The custom_code function (Chapter 13).

The bridged_resource function (Kinetic Request 5.1) configures a bridged resource to be used.  See Bridged Resources for details and examples regarding bridged resources.

Creating Custom Action Events

event "Custom Action",
  :custom_action,
  :load,
  :fire_if => "1==1" do
  custom_code "alert('Hello World!');"
end

The custom action event above is for a page element. On page load the custom JavaScript code will be executed. There will be a JavaScript alert with the message “Hello World!”

Submission Lock Events

Submission lock events (Kinetic Request 5.1) can be used to lock and unlock a submission record.  Along with these events some other configuration is required.  See Submission Locks for details and examples regarding submission locking.