Power Table Cell Editing: Resolving Dataset Updates

Karen Mitchell1 min read
HMI ProgrammingOther ManufacturerTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Why the Power Table Cell Does Not Update

Making a Power Table cell editable does not by itself store the edited value in the table dataset. The confirmed failure occurred because the dataset-update code was outside the table's onCellEdited extension function, so the edit callback did not execute it.

Required Power Table Configuration

Requirement Purpose
Editable column Allows the operator to change the cell.
onCellEdited extension function Receives the edit and writes the new value to the dataset.
Correct code indentation Keeps the update statements inside the extension function.

Implement the Dataset Update

  1. Open the Power Table Customizer and mark the target column editable.
  2. Open the table's onCellEdited extension function.
  3. Uncomment the existing dataset-update code.
  4. Indent both statements so they execute inside onCellEdited.
import system
self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)

The function uses the supplied row and column indexes to set the edited value, then assigns the resulting dataset back to self.data.

Verify the Correction

Edit a cell in the configured column and complete the edit. Confirm that the displayed cell retains newValue. If it reverts or remains unchanged, first verify that the column is editable, the code is enabled, and both lines are indented within onCellEdited.

FAQ

Why does my Power Table cell revert after editing?

The column may be editable while the update code is not executing. Place the dataset assignment inside the onCellEdited extension function.

What code updates an edited Power Table dataset cell?

Use self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue) inside onCellEdited, with system imported.

Why does uncommenting onCellEdited code still not work?

Check its indentation. If the statements are outside the extension function, add one level of indentation so the callback executes them.

Back to blog