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

Add support for arrays and nested values in condition text (visibleIf property) and text pre-processing (for example completeHtml) #177

Closed
andrewtelnov opened this issue Jan 5, 2017 · 9 comments

Comments

@andrewtelnov
Copy link
Member

andrewtelnov commented Jan 5, 2017

Multiple text and matrix values can't be used in visibleIf and text pre-processing at the current moment, since their values contains nested properties and arrays.
For example "{bestPrice.minPrice} >= 10" will do nothing right now.
However, it should work.

andrewtelnov added a commit that referenced this issue Jan 5, 2017
…nd conditional to allow using arrays and nexted values: #177
@andrewtelnov andrewtelnov changed the title Add support for arrays and nested values in condition text (ifVisible property) and text pre-processing (for example completeHtml) Add support for arrays and nested values in condition text (visibleIf property) and text pre-processing (for example completeHtml) Jan 5, 2017
andrewtelnov added a commit that referenced this issue Jan 5, 2017
@andrewtelnov
Copy link
Member Author

Implemented.

@nelero
Copy link

nelero commented Jan 12, 2017

is this available in the latest version on surveyjs.org ?
i'd like to have a visibleIf condition based on a matrix value

@andrewtelnov
Copy link
Member Author

@nelero I have just updated the zip on surveyjs.org, but do not update the npm packages yet.

Thank you,
Andrew

@GuiAfonso
Copy link

@andrewtelnov I have an array of number result of a checkbox, can I check if one number is in array using a visibleif condition?
{"variable":["1","2","3"]}
{variable}.contains('1')
Something like that

@andrewtelnov
Copy link
Member Author

@GuiAfonso sure you may use contains:
{variable} contains '1'

Thank you,
Andrew

@GuiAfonso
Copy link

@andrewtelnov thanks bro, works perfectly.

Have a documentation with all conditions? To don't ask this silly question again.

@andrewtelnov
Copy link
Member Author

Will do :-)

@andrewtelnov
Copy link
Member Author

@GuiAfonso Here it is: http://surveyjs.org/docs/QuestionBase/visibleIf.html

@GuiAfonso
Copy link

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants