Page 1 of 1

Show Toggle based on Queryresult

Posted: Tue Aug 06, 2013 3:58 pm
by Fabian Unruh

I would like to show a toggle in my app.

the toggle should only be visible when a field in my database is set to 'true'.

can i do this by adding a JavaScript after the i lnvoke the query-service? how would the JS be set up?

Thanks!!


Show Toggle based on Queryresult

Posted: Tue Aug 06, 2013 4:08 pm
by Oleg Danchenkov

You can add mapping from target response field to "visible" property of toggle component and add JS to mapping.
For example
codeif (value == "show") {
return true; // show toggle
} else {
return false; // hide toggle
}/code


Show Toggle based on Queryresult

Posted: Wed Aug 07, 2013 1:51 pm
by Fabian Unruh

cool, works! thank you