Hi all, I have the following problem.
Practically in a power table connected to a POSTGRES table I can insert and modify data of any type.
My problem is as follows.
How can I go about deleting data in a table row via a button script?
This is the script in Power Table :
def onCellEdited(self, rowIndex, colIndex, colName, oldValue, newValue):
Index = self.data.getValueAt(rowIndex,colIndex)
column = '"'+ colName+ '"'
# Create a Python dictionary of parameters to pass.
parameters = {"nq_id": self.data.getValueAt(rowIndex,0) , "nq_col":column, "nq_val": newValue}
if colName == "PesoSpecifico":
# Run the Named Query.
system.db.runNamedQuery("PesoSpecifico", parameters)
else:
# Run the Named Query.
system.db.runNamedQuery("Prodotti", parameters)
# Refresh Table
self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)
I want to clarify that I can perfectly modify the table with this script (NAMED QUERIES)
I would basically like to select a row and clear the values of that row with a script in a button.
Now I can do it but I have to go to each value and delete them one by one, very inconvenient for my client.