surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
863 stars 363 forks source link

Cannot set up validation rules or triggers for different Dynamic Matrix rows #4454

Closed JaneSjs closed 10 months ago

JaneSjs commented 10 months ago

https://github.com/surveyjs/survey-creator/assets/22372972/e34a5445-b5eb-4b67-b90a-e460d4444de0

{
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "matrixdropdown",
     "name": "matchingQuestion",
     "title": "Match the plant parts with their names",
     "correctAnswer": {
      "leaves": {
       "Column 1": "A"
      },
      "roots": {
       "Column 1": "B"
      },
      "stem": {
       "Column 1": "C"
      },
      "flower": {
       "Column 1": "D"
      },
      "petals": {
       "Column 1": "E"
      }
     },
     "validators": [
      {
       "type": "expression",
       "text": "Roots | B. Anchor the plant in the soil and absorb water.",
       "expression": "{matchingQuestion.roots.Column 1} = 'B'"
      },
      {
       "type": "expression"
      }
     ],
     "columns": [
      {
       "name": "Column 1",
       "title": " "
      }
     ],
     "choices": [
      {
       "value": "C",
       "text": "Supports the leaves and flowers, transports water and nutrients."
      },
      {
       "value": "E",
       "text": " Colorful part of the flower, attracts pollinators."
      },
      {
       "value": "A",
       "text": "Absorb sunlight for photosynthesis."
      },
      {
       "value": "D",
       "text": "Reproductive structure that produces seeds."
      },
      {
       "value": "B",
       "text": "Anchor the plant in the soil and absorb water."
      }
     ],
     "rows": [
      {
       "value": "leaves",
       "text": "Leaves"
      },
      {
       "value": "roots",
       "text": "Roots"
      },
      {
       "value": "stem",
       "text": "Stem"
      },
      {
       "value": "flower",
       "text": "Flower"
      },
      {
       "value": "petals",
       "text": "Petals"
      }
     ]
    }
   ]
  }
 ]
}
JaneSjs commented 10 months ago

@andrewtelnov the same issue occurs for Triggers:

https://github.com/surveyjs/survey-creator/assets/22372972/6f5719ab-65ce-447c-b97c-2c9ba5b78232

The issue was reported at T14262 - Issue with Triggers in new version (1.9.102) https://surveyjs.answerdesk.io/internal/ticket/details/T14262