Question T8568
Visible to All Users

How to access external variable in visibleIf

created 3 years ago (modified 3 years ago)

how we can use external variable in visibleIf and enableIf …
i tried with survey.setVariable()
survey.getVeriable()

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

I need to hide perticular question if array is empty.

thanks,
tejal

Answers approved by surveyjs Support

created 3 years ago

Hello,
Here is your expression:

Code
"visibleIf" : "{connectivityGroups.length} == 0"

and your code:

JavaScript
//make it visible survey.setVariable("connectivityGroups", []); //make it invsibile //survey.setVariable("connectivityGroups", [1]);

Your updated example.

Thank you,
Andrew
SurveyJS Team