Dataset - Delete row

Declaration

<AMDATASET ACTIVITY="delete_row" DATASET="text" INDEX="number" />

Related Topics   

Description

Deletes one or more specified rows from a dataset.

Practical usage

Used to delete one or more specified rows from a dataset.

Parameters

General

Property Type Required Default Markup Description
Dataset name Text Yes (Empty) DATASET="Customers" Specifies the dataset to delete rows from.
Delete at Text (options) Yes End
  • ROWLOCATION="index"
  • ROWLOCATION="end"
Specifies where to delete the rows at. The options are:
  • Row index - Deletes rows by the specified row index numbers.
  • End (default) - Deletes the row at the end of the dataset.
Rows (for example,. 1 or 1,3,5) Number Yes (Empty) INDEX="5,23,33,37" The row index numbers to delete. To delete more than one row at a time, separate each row index number by a comma (for example, 1,4,55,200). This parameter is required if Delete at is set to Row index.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This task uses the Create, Insert Row, and Delete Row Dataset activities to first create a dataset with three columns, append two rows with data at the end of it, and then finally deletes the first row in the dataset by index number.

Copy
<AMDATASET RESULTDATASET="myDataset" COLUMNS="heading1;heading2;heading3" DELIMITER="semi_colon" DESCRIPTION="This is user input description showing in variables panel of Task Builder" />
<AMDATASET ACTIVITY="insert_row" DATASET="myDataset"><COLUMNSETTER COLUMNNAME="heading1" VALUE="FirstEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="FirstEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="FirstEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="insert_row" DATASET="myDataset"><COLUMNSETTER COLUMNNAME="heading1" VALUE="SecondEntryvalue1" /><COLUMNSETTER COLUMNNAME="heading2" VALUE="SecondEntryvalue2" /><COLUMNSETTER COLUMNNAME="heading3" VALUE="SecondEntryvalue3" /></AMDATASET>
<AMDATASET ACTIVITY="delete_row" DATASET="myDataset" INDEX="1" />