"deleteLines"

Searches columns with key values and deletes all lines in which these values exist.

Synopsis

setValue (string shape, "deleteLines", int n, string schName1, <dyn_type1> schValue1 [, string schName2, <dyn_type2> schValue2 ...]);

shape.deleteLines (int n, string schName1, <dyn_type1> schValue1 [, string schName2, <dyn_type2> schValue2 ...]);

setValue ( string shape, "deleteLines", int n, string schName1, <dyn_dyn_type1> schValue1 [, string schName2, <dyn_dyn_type2> schValue2 ...]);

shape.deleteLines (int n, string schName1, <dyn_dyn_type1> schValue1 [, string schName2, <dyn_dyn_type2> schValue2 ...]);

Parameters

Parameter Description
shape Name of the object
n Number of keys
schName1 Name of the key column
schValue1 Key value (dyn_type/dyn_dyn_type arbitrary ) that is deleted

Description

This attribute is used to delete the rows in which certain conditions are met. Each row of the column "schName"; is checked to see whether its contents match the associated key "schValue";. Several conditions can be stipulated here with the number of conditions specified by the variable n. If all n conditions have been met, the corresponding rows will be deleted.

Example

This example searches for "Carl", "Julia" and "Mart" in the name column. If the names have been found, they will be deleted.

main()
{
  int numb= 1;
  string name = "name"; //Name of the column
  dyn_dyn_string value1; //The key values that are searched in the table
  value1[1]= makeDynString("Carl");
  value1[2]= makeDynString("Julia");
  value1[3]= makeDynString("Mart");
  DebugN("deleting lines");
  Table1.deleteLines(numb,name,value1);//Deleting lines
}

Assignment

Table