Skip to main content
Version: 7.9

system.dataset.deleteRow

This function is used in Python Scripting.

Description

Takes a dataset and returns a new dataset with a row removed. Datasets are immutable, so it is important to realize that this function does not actually remove the row from the argument dataset. You'll need to do something with the new dataset that this function creates to achieve something useful.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.dataset.deleteRow(dataset, rowIndex)

Parameters

TypeParameterDescription
DatasetdatasetThe starting dataset. Please be aware that this dataset will not actually be modified (datasets are immutable), but rather will be the starting point for creating a new dataset.
introwIndexThe index (starting at 0) of the row to delete. Will throw an IndexError if less than zero or greater than the row count of the dataset -1.

Returns

Dataset - The HTML page as a string.

Scope

All

Code Examples

Example 1
# This example would remove the selected row from a List component, by re-assigning the List's data property to the new dataset returned by thedeleteRow function.

myList = event.source.parent.getComponent("List")
row = myList.selectedIndex
if row != -1: # make sure there is something selected
myList.data = system.dataset.deleteRow(myList.data, row)