Skip to main content
Kinetic Community

Kinetic Request Submission Get Answer Set

This handler builds a JSON answer set for the current submission.  The JSON structure maps question labels to their corresponding answers.

Downloads

By downloading this file, you acknowledge that you agree to our Terms of Service

kinetic_request_submission_get_answer_set_v1.zip

Detailed Description

Depending on the Mode, 'All' or 'Some', the handler builds a JSON mapping of question labels to their corresponding answers.

If the Mode is set to 'All' it will use every item in the @answers hash created by the task engine (which will include every question on the form).  If the Mode is set to 'Some' it will only use the questions defined in the Included Questions parameter (a comma-separated list of question labels).

In both cases, the questions defined in the Excluded Questions parameter (another comma-separated list of question labels) will always be excluded from the output JSON mapping.

Also, in cases where question labels differ from form to form, the Question Aliases parameter can be used to define new question labels to be used.  The Question Aliases parameter takes a comma-separated list of label mappings.  A label mapping is defined by the current label then an equals symbol then the new label to be used.  For example:  RequesterFirstName=FirstName.  If the Question Aliases string is configured with an improper format the task handler will raise an exception.

Parameters

Name Description
Mode If 'All' the entire set of questions will be used.  If 'Some' the questions listed in the 'Included Questions' parameter will be used.  In both cases, questions listed in the 'Excluded Questions' parameter will never be included in the generated output.
Included Questions A comma separated list of question menu labels that should be explicitly included in the question list.  This is only needed if the 'Mode' parameter is set to 'Some'.  Whitespace matters; ensure there are no spaces after a comma separating the menu labels (unless the question menu label includes a preceding space).
Excluded Questions A comma separated list of question menu labels that should be explicitly excluded from the question list.  Questions included in this list will be excluded even if they are included in the 'Included Questions' parameter.  Whitespace matters; ensure there are no spaces after a comma separating the menu labels (unless the question menu label includes a preceding space).
Question Aliases A specially formatted mapping of question labels in the answer hash to labels to be used in the answer set.  This is necessary when an answer should be forwarded, but the question's label varies from form to form.  The alias format is as follows:  OldQuestionLabel=NewQuestionLabel,RequesterFirstName=FirstName.

Sample Configuration

Parameter Example Configuration
Mode Some
Included Questions First Name,Last Name,Requester Login
Excluded Questions  
Question Aliases Requester Login=Username

Results

Name Description
Answer Set A JSON mapping of question labels to their corresponding answers (see example below).
{
  "First Name":"Don",
  "Last Name":"Demo"
}

Change Log

Version Date Description
1 23 April 2012 Initial version
1 21 Jun 2017 Only load JSON in Task 3 and below to make it compatible with Task 4 and above.