Skip to main content
Kinetic Community

Event Data Requests

A data request can be created for set fields external, populate menu, or custom action events with the data_request function. The data_request function takes one string argument, the name of the form that the simple data request retrieves data from.

Event Data Request Options

The :max_entries option configures the maximum number of entries returned by the simple data request.

The :sort_order option configures the sort order (“Ascending” or “Descending”) of the values returned by the simple data request.

The :qualification option configures the qualification of the simple data request.

The :sort_fields option configures the sort by fields for set fields external or custom action events’ simple data requests. This option takes a string of fields separated by commas.

The :fields_available option configures the fields available for the custom action event’s simple data request. This option takes a string of fields separated by commas.

The :sort_field option configures the sort by field for a populate menu event’s simple data request.

The :label_field option configures the label field of the populate menu event’s simple data request.

The :value_field option configures the value field of the populate menu event’s simple data request.

The :name option configures the name field of the custom action event’s simple data request.

Creating Event Data Requests

data_request "Employee",
  :sort_fields => "LastName",
  :max_entries => "10",
  :sort_order => "Ascending",
  :qualification => "1=1"

The data request above is for a set fields external event. It will retrieve entries from the specified form that match the qualification and sorted by the fields given.

data_request "Employee",
  :label_field => "Name",
  :value_field => "ID",
  :sort_field => "ID",
  :max_entries => "10",
  :sort_order => "Ascending",
  :qualification => "1=1"

The data request above is for a populate menu event. It will retrieve entries from the specified form that match the qualification. The label field will be used as the choice label and the value field will be used as the choice value and they will be sorted by the sort field.

data_request "Employee",
  :name => "Custom SDR",
  :fields_available => "Name, ID",
  :sort_fields => "ID",
  :max_entries => "100",
  :sort_order => "Ascending",
  :qualification => "1=1"

The data request above is for a custom action event. It will retrieve the fields Name and ID from the Employee form. The data request will return 100 entries sorted by field ID.