Question T10295
Visible to All Users

Visible if conditon wrong in panel dynamic

created 2 years ago

Hello,

There is a feature in creator where user can drag and drop question within the content area. When user add a logic in visibleIf and if user drag that question inside panel dynamic then the previous added logic is not working.

here is example
In the above example, the are question1(checkbox) and question2(rating) and question3(paneldynamic). we add a logic on question 2 when it was not added inside panel dynamic and after adding logic on question as visibleIf: "{question1} = ['item1']" and then we drag question 1 and question2 inside panel dynamic. In this case the logic condition needs to updated automatically to VisibleIf: {panel.question1} = ['item1'] or else the condition will not work anymore.

Can this be fixed or user have to do it manually?

Answers approved by surveyjs Support

created 2 years ago

Hello,
Right now it has to be done manually. In general case, It is impossible to fix expression on adding/removing question into/from panel dynamic. Let's say you have two question on the page level: "question1" and "question2" and "question2" use "question1" in an expression. Now you move "question1" inside a dynamic panel. What ever you do, expression in "question2" becomes invalid, because "question2" is an another level, on page level and not on dynamic panel level.
I would say, it is a rare case anyway.

Thank you,
Andrew
SurveyJS Team