Creating queries in KX Dashboards with code editor

https://learninghub.kx.com/forums/topic/creating-queries-in-kx-dashboards-with-code-editor

Is it possible to execute q code mapped to a view state (string), editable with the Code Editor component, on data tables for the selected connection?  

How would this be done in the data editor, presumably using value?

Figured it out

{[Qcode;Qsimple]

/ Qsimple viewstate type string: 2+2

/ value "2+2" = 4

/ value Qsimple = 4

value Qcode

}