Please help us help you and fill where relevant:
Your LimeSurvey version: [5.4]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Hi Everyone,
The code mentioned below has been used for the past 5 years with different versions of Limesurvey.
But since we had a Limesyrvey update (version 5.4) we have been getting error 424.
We get the following error message. (Error 424)
This is de code with issue
Public Function GetObjectProperty(ByVal JsonObject As Object, ByVal propertyName As String) As Object
Set GetObjectProperty = ScriptEngine.Run("getProperty", JsonObject, propertyName)
End Function
Does anyone have a solution for this? I hope some one can help me.
Sub GetResponseData(sid As String)
Dim strTheLot As String, objAllResponses As Object
Dim strResponseID As String, objTheResponses As Object
Dim strCriteria As String, objOneResponse As Object
Dim strSQL As String, objAllQuestionsOfOneResponse As Object
Dim strOldContent As String, intI As Integer
Dim strNewContent As String
Dim strOldToken As String
Dim strNewToken As String
Dim ResponsesKeys() As String, OneResponseKeys() As String
strTheLot = ExportResponses(sid)
Set objAllResponses = DecodeJsonString(strTheLot)
If IsNull(GetProperty(objAllResponses, "result")) Or GetProperty(objAllResponses, "result") = "" Then
Set objTheResponses = GetObjectProperty(objAllResponses, "responses")
ResponsesKeys = GetKeys(objTheResponses)
For intI = 0 To UBound(ResponsesKeys)
'find the response_id
Set objOneResponse = GetObjectProperty(objTheResponses, CStr(ResponsesKeys(intI)))
OneResponseKeys = GetKeys(objOneResponse)
strResponseID = OneResponseKeys(0)
MsgBox OneResponseKeys(0)
Set objAllQuestionsOfOneResponse = GetObjectProperty(objOneResponse, strResponseID) ERROR 424
strNewContent = MakeString(objAllQuestionsOfOneResponse)
'Debug.Print strNewContent
'find in strNewContent the value for token
strNewToken = GetProperty(DecodeJsonString(strNewContent), "token")
strCriteria = "sid='" & sid & "' and response_id='" & strResponseID & "'"
End Sub