Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition Builder - A dynamic matrix doesn't appear in a list of available questions #6093

Open
JaneSjs opened this issue Nov 18, 2024 · 0 comments
Assignees
Labels
usability user issue An issue or bug reported by users.

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Nov 18, 2024

T20733 - Dynamic matrix question is not showing while adding logic conditions to other questions
https://surveyjs.answerdesk.io/internal/ticket/details/T20733


A matrix can be used in exressions: for instance, to check whether a matrix is not empty.

{matrix} notempty

image
Consider a demo survey JSON:

{
  "logoPosition": "right",
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "matrixdynamic",
          "name": "question1",
          "columns": [
            {
              "name": "Column 1"
            },
            {
              "name": "Column 2"
            },
            {
              "name": "Column 3"
            }
          ],
          "choices": [
            1,
            2,
            3,
            4,
            5
          ]
        }
      ]
    },
    {
      "name": "page2",
      "elements": [
        {
          "type": "radiogroup",
          "name": "question2",
          "choices": [
            {
              "value": "Item 1",
              "text": "Yes"
            },
            {
              "value": "Item 2",
              "text": "No"
            }
          ]
        },
        {
          "type": "matrixdynamic",
          "name": "question3",
          "columns": [
            {
              "name": "Column 1"
            },
            {
              "name": "Column 2"
            },
            {
              "name": "Column 3"
            }
          ],
          "choices": [
            1,
            2,
            3,
            4,
            5
          ]
        }
      ]
    }
  ],
  "triggers": [
    {
      "type": "copyvalue",
      "expression": "{question2} = 'Item 1' and {question1} notempty",
      "fromName": "question1",
      "setToName": "question3"
    }
  ]
}

However, the condition editor doesn't display a matrix in a list of available form elements:
image

@JaneSjs JaneSjs added usability user issue An issue or bug reported by users. labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability user issue An issue or bug reported by users.
Projects
None yet
Development

No branches or pull requests

2 participants