Hey there thank you for your replies. I try to answer in more detail and I also attached a screenshot of the Infrastructure as well as a demo survey that I created. I'm using LimeSurvey
Version 3.25.20
.
Question Group1:
Q1: Chatbot. This question is a Text Display Question, in the source of Q1 I integrated a Chatbot using an Iframe. I pass the Limesurvey-userToken to the chatbot, so I know which user is interacting with the chatbot. When the conversation is finished the chatbot decides whether Q2 should be answered with yes or no. To communicate this decision I use the Limesurvey 2 API in Python. In more detail I use the API method: update_response(string $sSessionKey,integer $iSurveyID,array $aResponseData): string|boolean. In order that to update the correct data I use the question-identifier and the Limesurvey-userToken. To check whether the update_response call worked I go to the Responses-Tab in the Limesurvey Menu, where I can see that Q2 is now answered.
Q2: Decision is a Yes/No question. This question is hidden by entering 0 into the relevance equation of the question. I use it as a "dummy" question that is used to communicated from the chatbot to the LimeSurvey.
Question Group2:
Q3: OptionalQuestion. This question should only be displayed if Q2 is set to yes, this should be achieved by the following relevance equation: ((Decision.NAOK == "Y")).
However, here comes the problem:The relevance equation is evaluated as false and the question is not displayed, even if the result of Q2 is set to "Y" in the database (verified by looking at the Responses Tab in the LimeSurvey).
I think the problem is that the relevance equation doesn't use the value of Q2 that is saved in the database.
Is this correct does the relevance equation use some kind of "cached" values?
If so is there a workaround such that this relevance equation uses the value that is stored in the database?
If not is there another way to achieve such a behavior: Display certain questions based on an external Program?
Thanks a lot for your help
Jonas