survey-creator
survey-creator copied to clipboard
Logic with Boolean Yes/No is not displaying
Are you requesting a feature, reporting a bug or asking a question?
Asking a question
What is the current behavior?
I have created a Multi-select matrix with boolean Yes/No toggles as the cell type. I am unable to create logic statements that refer to the matrix and boolean Yes/No toggles. The logic wand for 'question1.ImmedAct' asks for 'questionValue' rather than Yes/No Boolean.
What is the expected behavior?
Logic wand should display possible logical statements based on Yes/No Boolean rather than 'questionValue'.
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
{
"title": "GitHub2",
"description": "infection control audit",
"logoPosition": "right",
"pages": [
{
"name": "page2",
"elements": [
{
"type": "paneldynamic",
"name": "question1.Panel",
"maxWidth": "1000px",
"title": "question1",
"questionCategory": "surveyquestion",
"templateElements": [
{
"type": "matrixdropdown",
"name": "question1",
"maxWidth": "1000px",
"title": "Additional Precautions",
"titleLocation": "hidden",
"questionCategory": "surveyquestion",
"verticalAlign": "top",
"alternateRows": true,
"columns": [
{
"name": "question1.response",
"title": "Question Response",
"cellType": "boolean"
}
],
"choices": [
1,
2,
3,
4,
5
],
"cellType": "boolean",
"rows": [
"Row1",
"Row2",
"Row3 <style> span.tooltip{ position:absolute; } span.tooltip:hover{ text-decoration:none; } span.tooltip:after{ content: attr(tip); line-height:1.2em; color:#000000; width:200px; padding:5px 10px; border-radius:6px; background:#ffffff; position:absolute; top:-50px; left:20px; display:none; -moz-box-shadow: 3px 3px 4px rgba(0,0,0, .65); -webkit-box-shadow: 3px 3px 4px rgba(0,0,0, .65); box-shadow: 3px 3px 4px rgba(0,0,0, .65);}} span.tooltip:before{ z-index:1000; position:absolute; content:\"\"; top:15px; left:0px; border-right:7px; border-left:7px; display:none; } span.tooltip:hover{ z-index:1000; position:relative; } span.tooltip:hover:after{ display:block; } span.tooltip:hover:before{ display:block; }</style> <span class=\"tooltip\" tip=\"Tooltip\"><i class=\"p-element ic ic-info-circle p-button-icon-right ng-star-inserted\"></i></span>"
]
},
{
"type": "paneldynamic",
"name": "question1.ImmedAct",
"title": "<span style=\"border:1px solid #B2B2B2; background-color:#F1F1F1; padding:20px; font-family: 'lato'; color:#000000; font-size:16px; text-align:center;\"><span class=\"ic ic-exclamation-triangle\" style=\"padding-right:10px;\"></span>Immediate Action Required!</span>",
"questionCategory": "surveyquestion",
"templateElements": [
{
"type": "checkbox",
"name": "question1.ImmedActQ",
"title": "Complete the following:",
"isRequired": true,
"questionCategory": "surveyquestion",
"choices": [
"Discreetly address issue with individual."
]
}
],
"allowAddPanel": false,
"allowRemovePanel": false,
"panelCount": 1
}
],
"allowAddPanel": false,
"allowRemovePanel": false,
"panelCount": 1
}
]
}
]
}
Specify your
browser: Chrome browser version: 119.0.6045.160 surveyjs platform (angular or react or jquery or knockout or vue): Angular surveyjs version: 1.9.112
Hello @ilaplain15115,
It appears that the issue occurs when a column name's prefix matches the matrix name (question1). In the meantime, I recommend that you update the column name. For instance, set it to question1_response.
{
"title": "GitHub2",
"description": "infection control audit",
"logoPosition": "right",
"pages": [
{
"name": "page2",
"elements": [
{
"type": "paneldynamic",
"name": "question1.Panel",
"maxWidth": "1000px",
"title": "question1",
"templateElements": [
{
"type": "matrixdropdown",
"name": "question1",
"maxWidth": "1000px",
"title": "Additional Precautions",
"titleLocation": "hidden",
"verticalAlign": "top",
"alternateRows": true,
"columns": [
{
"name": "question1_response",
"title": "Question Response",
"cellType": "boolean"
}
],
"choices": [
1,
2,
3,
4,
5
],
"cellType": "boolean",
"rows": [
"Row1",
"Row2",
"Row3 <style> span.tooltip{ position:absolute; } span.tooltip:hover{ text-decoration:none; } span.tooltip:after{ content: attr(tip); line-height:1.2em; color:#000000; width:200px; padding:5px 10px; border-radius:6px; background:#ffffff; position:absolute; top:-50px; left:20px; display:none; -moz-box-shadow: 3px 3px 4px rgba(0,0,0, .65); -webkit-box-shadow: 3px 3px 4px rgba(0,0,0, .65); box-shadow: 3px 3px 4px rgba(0,0,0, .65);}} span.tooltip:before{ z-index:1000; position:absolute; content:\"\"; top:15px; left:0px; border-right:7px; border-left:7px; display:none; } span.tooltip:hover{ z-index:1000; position:relative; } span.tooltip:hover:after{ display:block; } span.tooltip:hover:before{ display:block; }</style> <span class=\"tooltip\" tip=\"Tooltip\"><i class=\"p-element ic ic-info-circle p-button-icon-right ng-star-inserted\"></i></span>"
]
},
{
"type": "paneldynamic",
"name": "question1.ImmedAct",
"title": "<span style=\"border:1px solid #B2B2B2; background-color:#F1F1F1; padding:20px; font-family: 'lato'; color:#000000; font-size:16px; text-align:center;\"><span class=\"ic ic-exclamation-triangle\" style=\"padding-right:10px;\"></span>Immediate Action Required!</span>",
"templateElements": [
{
"type": "checkbox",
"name": "question1.ImmedActQ",
"title": "Complete the following:",
"isRequired": true,
"choices": [
"Discreetly address issue with individual."
]
}
],
"allowAddPanel": false,
"allowRemovePanel": false,
"panelCount": 1
}
],
"allowAddPanel": false,
"allowRemovePanel": false,
"panelCount": 1
}
]
}
]
}
Now, the Logic editor correctly displays a cell editor.
I'll forward this issue to our developers for further research. Please stay tuned.
Hi @ilaplain15115, I discussed this issue with the team. Survey element names may not include dots. Therefore, we may not handle such usage scenario in the meantime. Please consider updating the column name and removing the question name prefix.
Thanks