Delete from Table

From UBot Studio
Jump to: navigation, search

Delete from Table is a Data Command.

This command deletes a specified row or column and moves the remaining populated rows or columns over.

Table: The table where the desired column or row will be deleted from.

Delete: To delete by row, select "Row". To Delete by column, select "Column".

Index: The row or column number to delete.


Example

navigate("http://www.fruitsinfo.com/tropical-fruits.php", "Wait")
add list to list(%one, $scrape attribute(<href=w"http://www.fruitsinfo.com/*.php">, "innertext"), "Delete", "Global")
add list to table as row(&test1, 0, 0, %one)
plugin command("TableCommands.dll", "delete from table", &test1, "Column", 0)
plugin command("TableCommands.dll", "delete from table", &test1, "Column", 0)


The script above adds the lists contents to a table as a row. However, notice the empty spaces in column 0 and 1.


Del.jpg


This is why the two delete form table commands have been added. Running the entire script will populate the table with the lists' contents, and then remove columns 0 and 1.

We have added two delete from table commands because deleting the column 0 moves the rest of the script up.

Column 1 row 0 becomes column 0 row 0, and the second delete from table command delete the contents of column 0 again, moving the contents of that column up to replace the empty space.


Del1.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox