Skip to content

StateDMI / Command / DeleteTableRows


Overview

The DeleteTableRows deletes a specified row from a table.

Command Editor

The following dialog is used to edit the command and illustrates the syntax of the command. See also the full-size image.

DeleteTableRows command editor

DeleteTableRows Command Editor

Command Syntax

The command syntax is as follows:

DeleteTableRows(Parameter="Value",...)

Command Parameters

Parameter                           Description Default          
TableID
required
The table identifier for the table to process. Can specify with ${Property}. None - must be specified.
DeleteRowNumbers
required
The row number (1+) or last to delete the last row. Can use ${Property} to specify row number. None - must be specified.

Examples

See the automated tests.

A simple comma-separated-value data as follows can be read with ReadTableFromDelimitedFile:

# Simple table for testing
"string1","double1","integer1"
"String1",1.0,1
"String2",2.0,2
"String3",3.0,3

The command file to read the above file and remove the first and last rows is as follows:

ReadTableFromDelimitedFile(TableID="Table1",InputFile="testtable.csv")
DeleteTableRows(TableID="Table1",DeleteRowNumbers="1")
DeleteTableRows(TableID="Table1",DeleteRowNumbers="last")

Troubleshooting

See the main troubleshooting documentation

See Also