I have an EasyGraph, is there a way to change the WHERE CLAUSE from a Button-Script?
thanks
Yes, regenerate the pens
dataset with a script. (Typically with system.dataset.setValue().)
If someone Need the code just to replace where clause in an specific DB pen ,in this case row 1 col 16 (which is the WHERE clause.)
chart = event.source.parent.getComponent('Easy ChartT')
tagPenDataSet = chart.pens
#print "Row Count = ", tagPenDataSet.rowCount, " Column Count = ", tagPenDataSet.columnCount,"\n"
newWhereClause = "Equip_ID = '221' and Wireline = '1'"
originalData = system.dataset.toPyDataSet(tagPenDataSet)
newData = system.dataset.setValue(originalData, 1, 16, newWhereClause)
chart.pens = newData