Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Zen Controls: How to read value of a control in a zen method

Question
ED Coder · Jan 8, 2021

Zen Controls: How to read value of a control in a zen method

I have a text control : <text id="clinic" label="Type Clinic Code ">. I want to retrieve the value of this control in my zen method. But I keep getting errors.

ClassMethod readValues(bData As %ZEN.proxyObject, act As %String) As %Boolean [ ZenMethod ]

{

  zenPage.getComponentbyId('clinic').getValue() // this doesnt work

%clinic.%GetValue(); // Tried this as well but getting errors

}

Can I get some advice on this? Apologies if this is a simple question. Just learning and developing using zen pages

#ZEN #Ensemble

Source URL:https://community.intersystems.com/post/zen-controls-how-read-value-control-zen-method