Question T12734
Visible to All Users

How to resolve the isvisible flag wrongly update ?

created 2 years ago (modified 2 years ago)

Hi,

Actually I using two questions. one question is radio group. second question is dynamic penal. So inside dynamic panel I added two questions like question3 and question4. the question3 visible when question1 answer Item 1.
I default set data for question1 is Item 2 and I added 'and' condition true or false flag like,

for example, {question1} = 'Item 2' and true

So the basic condition is failed. but when I check the question isvisible flag the question3 isvisible flag return true but i want false and isvisible flag return true everytime if visbleif condition fails or pass, but in UI not display. Could you please give any solution for get what are question display in UI based on visible if? please help here. Thanks.

Show previous comments (4)

    Hello,
    May I know how exactly you wish to use the visibility of a question by the time you load a survey? Please share an example of usage.

      Hi,
      actually I already told three type of questions. I am using three different screens. So that when I am loading survey and result json. That time I need to validate which questions are displayed based on visibleif condition.

      for example I am in first page first type of questions only display I answer it and I click save. The page move to next page here I can display first type of question read only mode and second question display when complete. I move to next page some progress. So here when I am first place and save I need to check if any questions are display or not based on visibleIf condition. if available I need to move second page. if not available I need to check third type question visible or not based on visibleIf condition.

      So I need to check all question every time. This is my scenario. Could you please tell how to get visible and hidden questions? when page load that time I need to validate this things.

        Hello Swathi,
        You can check a question's isVisible option to determine whether or not a question is visible.

        If a question is located inside a dynamic panel, you can get a panel instance and obtain a question instance from it. For example:

        JavaScript
        const panel = survey.getQuestionByName('panelDynamicQuestion'); let question3 = panel.panels[0].getQuestionByName('question3'); let questionIsVisible = question3.isVisible ...

        https://plnkr.co/edit/viTi5LXY6bGq1wzQ?preview

        Please let me know if this option suits you.