Delivery by workflow instructions include support for setting the title and abstract of the survey result element via the XPath specifications available in TitlePath and AbstractPath. These setting are semicolon ';' separated literals and XPaths that reach back into the SurveyResult DOM itself. A literal is denoted by leading and trailing single quotes. Otherwise, it is an XPATH.
To access the user response of a given specific question, you need to reference the result field as follows.
SURVEYFORM/QuestionShortAnswer[@tag='Name']/Response
Where QuestionShortAnswer is the type of question and then @tag is the xml normalized title of the question you want to use.
For Example - suppose you are operating on a SurveyResult with XML that looks something like:
<SURVEY>
<WHICH encoded='A1x66x1y1x19bdx1xfey1x43fx1x67y1x36fx1x8c'>Survey - text over answer</WHICH>
<WHEN>2011-08-01 14:13:30</WHEN>
<WHO/>
<SURVEYFORM>
<QuestionShortAnswer encoded='A1x66x1y1x19bdx1xfey1x43fx1x67y1x36fx1x8cy1x624bx1x94'
name='Name'
qtype='QuestionShortAnswer'
tag='Name'
title='What is your name?'
which='I -'>
<QuestionText>What is your name?</QuestionText>
<Response>Fred Flintstone</Response>
</QuestionShortAnswer>
</SURVEYFORM>
</SURVEY>
For the title, you would like something of the order: "Response on: date-of-response", and you want the abstract to be the response to the Name question. You would then use the folowing:
- TitlePath
- 'Response on: ';WHEN
- AbstractPath
- SURVEYFORM/QuestionShortAnswer[@tag='Name']/Response