Skip to main content
Kinetic Community

Kinetic Request Submission Format Answers HTML

Builds a simple text and HTML result strings by formatting a specified subset of answers for the source Kinetic Request submission.

Downloads

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

Request RE pre 5.2 version users should use this version: kinetic_request_submission_format_answers_html_v4.zip

Request RE 5.2 version or greater users should use this version: kinetic_request_submission_format_answers_html_v5.zip

Detailed Description

Builds a simple text and HTML result strings by formatting a specified subset of answers for the source Kinetic Request submission.

To specify the answers to be formatted, any of the following can be configured (the answers will be sequenced in the normal page order of their corresponding questions):

  • A starting question question name (if the starting question is not provided, the first question of the service item will be used).
  • An ending question question name (if the ending question is not provided, the last question of the service item will be used).
  • A comma separated list of question names to explicitly include (questions included in this list will be included even if they do not exist between the starting and ending questions).
  • A comma separated list of question names to explicitly exclude (questions included in this list will not be included, even if they exist between the starting and ending questions, or were specified in the 'Included Questions' parameter).

Note the question name is "Question" in the authoring console, not menu label or question label.


This handler will format the results as such. It is possible to provide specific styling for the HTML result via the inputs provided, this is just results via the default input:

  • Text Result

Answers:

QUESTION_MENU_LABEL: ANSWER

QUESTION_MENU_LABEL: ANSWER

  • HTML Result

    Answers:<br> 
        <table> 
            <tbody>
                <tr>
                    <td style="font-weight: bold;">QUESTION_MENU_LABEL:</td>
                    <td>ANSWER</td>
                </tr>
                <tr>
                    <td style="font-weight: bold;">QUESTION_MENU_LABEL:</td>
                    <td>ANSWER</td>
                </tr>

            </tbody> 
        </table>

There are also options to include the name of the template at the top of the table and a review request link below the table/list of questions.

NOTE: This version doesn't currently support Question labels that contain a /

Parameters

Name Description
Starting Question The question name of the first question that should be formatted.  If this is left blank, the first question on the service item will be used.
Ending Question The question name of the last question that should be formatted.  If this is left blank, the last question on the service item will be used.
Included Questions A comma separated list of question names that should be explicitly included in the question list.  Questions included in this list will be included even if they do not exist between the starting and ending questions. Whitespace matters; ensure there are no spaces after a comma separating the question names (unless the question name includes a preceding space).
Excluded Questions A comma separated list of question names that should be explicitly excluded in the question list.  Questions included in this list will be excluded even if they exist between the starting and ending questions or are included in the 'Included Question' parameter.  Whitespace matters; ensure there are no spaces after a comma separating the question names (unless the question name includes a preceding space).
Survey/Request Instance ID Instance ID of the survey/request to retrieve answers for
Include Review Link Yes/No: Whether or not a review link should be included below the table
Include Template Name Yes/No: Whether or not the name of the template should be included above the table as a header
Default Web Server Default Web Server
Heading table structure header table structure
Question table tag open opening table tag and styling, defaults to: <table>
Question table tbody tag open Opening table tag and styling, defaults to: <tbody>
Question table tr tag open Opening tr tag and styling, defaults to: <tr>
Question table label td tag open Opening question label td tag and styling, defaults to: <td>
Question table label td tag close Closing question label td tag, defaults to: </td>
Question table answer td tag open Opening question answer td tag and styling, defaults to: <td>
Question table answer td tag close Closing question answer td tag, defaults to: </td>
Question table tr tag close Closing tr tag, defaults to: </tr>
Question table tbody tag close Closing body tag, defaults to: </tbody>
Question table tag close Closing table tag, defaults to: </table>

Sample Configuration

Parameter Example Configuration
Starting Question Question 1
Ending Question Question 6
Included Questions Question 11,Question 12,Question 19
Excluded Questions Question 2,Question 5
Survey/Request Instance ID KS000c29724a16Mu20UA0AhCpwASsi
Include Review Link No
Include Template Name No
Default Web Server http://mywebserver/kinetic
Heading table structure  
Question table tag open <table width="75%" border="0" cellpadding="5" cellspacing="5" style="font-family:arial,<wbr/>helvetica,sans-serif;">
Question table tbody tag open <tbody>
Question table tr tag open <tr>
Question table label td tag open

<td  style="font-weight: bold;">

Question table label td tag close </td>
Question table answer td tag open <td>
Question table answer td tag close </td>
Question table tr tag close </tr>
Question table tbody tag close </tbody>
Question table tag close </table>

Results

Name Description
result

The html result of answers referenced by the starting/ending question and included/excluded questions parameters.

Example Result:

 

Answers:<br> 
    <table width="75%" border="0" cellpadding="5" cellspacing="5" style="font-family:arial,<wbr/>helvetica,sans-serif;"> 
        <tbody>
            <tr>
                <td style="font-weight: bold;">Requester First Name:</td>
                <td>Brian</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">Requester Last Name:</td>
                <td>Peterson</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">Requester People Number:</td>
                <td>PPL000000000009</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">Requester Email:</td>
                <td>Brian.Peterson@<wbr/>kineticdata.com</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">Requester Login ID:</td>
                <td>PetersBN</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">Office:</td>
                <td>Off of Info Svcs</td>

            </tr>
            <tr>
                <td style="font-weight: bold;">Branch:</td>
                <td>Computer Operations Team</td>
            </tr>
            <tr>
                <td style="font-weight: bold;">What is the Business Justification?:</td>
                <td>test</td>
            </tr>
        </tbody> 
    </table>

    
textresult

The string result of answers referenced by the starting/ending question and included/excluded questions parameters.

Example Result:

Answers: 
Requester First Name: Brian Requester 
Last Name: Peterson 
Requester People Number: PPL000000000009 
Requester Email: Brian.Peterson@kineticdata.com 
Requester Login ID: PetersBN 
Office: Off of Info Svcs 
Branch: Computer Operations Team 
What is the Business Justification?: test

Change Log

Version Date Description
5 2015-12-18 Handles 5.2 unlimited answers.
4 2015-04-17

-Added ability to add template name as title
-Added ability to add review link as footer
-starting and ending questions no longer need to be required questions.
-Added ability to format table
-Added basic HTML escaping for answer and question label values for result

3   - fixed session reference bug
- skip unanswered/blank questions
2 2012-07-20 - uses specified submission, not necessarily the current one
- displays question labels in the results rather than question names
1 2011-11-28 Initial Version