Method

GetResponseHistory

ModuleInteraction
LibraryCore
Action


Get a response history of User Interaction surveys.


Parameters(None)
Return values

FreeText (string): Free text value input by the user.

This value is empty if there was no free text field as part of the survey, or if the user never entered a value for this field.

Invalidated (boolean): Indicates if the survey was invalidated for this user session.

Response (string): Text of the survey choice selected by the user.

ResponseTime (string): Time when the user responded to the survey, dismissed the survey or it timed out.

ResponseType (string): Indicates whether the user responded, dismissed the survey or the survey timed out.

ResponseValue (float): The value of the response chosen by the user.

The highest ordered choice (first in the table of choices) will have a response value of 1.
The lowest ordered choice (last in the table of choices) will have a response value of 0.
Those in between will be allocated a fractional value between 1 and 0 relative to their position.
For example, if the choices are: (Great, Good, Average, Poor, Terrible) then these will be scored:
Great=1.0, Good=0.75, Average=0.5, Poor=0.25, Terrible=0.

SurveyName (string): Name of the survey.

UserName (string): Username of the logon session associated with this survey response.

ValidityTime (string): The time when this survey is no longer valid.

Example


@surveyResponses = Interaction.GetResponseHistory();
SELECT FreeText, Response, ResponseValue, SurveyName, UserName FROM @surveyResponses WHERE
    ResponseType = "responded"
    AND Invalidated = false
    AND JULIANDAY(ValidityTime) > JULIANDAY(DATETIME("now"));


Platforms
  • Windows
Notes

Available from v5.1.

For more details on what is considered an active or valid response, see Interaction.ShowSurvey.