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

Home > Zen Table pane: Can I update a row in the table pane?

Question
ED Coder · Jan 22, 2021

Zen Table pane: Can I update a row in the table pane?

I am able to display my query result in the table pane, but I want to update it based on user click but it doesnt work. Can this be done? Below is what I am doing but it doesnt change my value on clicking. Would appreciate some guidance on this

I have ondblclick = zenPage.SelectItem

ClientMethod selectItem(id, time) [ Language = javascript ]
{

    table = this.getComponentById('tablename');
    var data = table.selectedIndex;
    var rowval = table.getRowData(data);
    var valuep = new zenProxy();
           valuep.TXTFLAG = rowval["TEXT"];
    zenPage.ToggleTextFlag(pP);

    var table = this.getComponentById('tablename');
     table.executeQuery();
}

ClassMethod ToggleTextFlag(bData As %ZEN.proxyObject, act As %String) As %Boolean [ ZenMethod ]
{
 if bData.TXTFLAG = "Y"
{
     s bData.TXTFLAG = "N"
}
else
{
s bData.TXTFLAG = "Y"
}

Set tSC = 0     

Quit tSC
}

#ZEN #Ensemble

Source URL:https://community.intersystems.com/post/zen-table-pane-can-i-update-row-table-pane