Delete from Table

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
(Example)
 
(2 intermediate revisions by one user not shown)
Line 2: Line 2:
  
 
This command deletes a specified row or column and moves the remaining populated rows or columns over.
 
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 ==
 
== Example ==
Line 17: Line 24:
 
The script above adds the lists contents to a table as a row. However, notice the empty spaces in column 0 and 1.
 
The script above adds the lists contents to a table as a row. However, notice the empty spaces in column 0 and 1.
  
[[File:del.png]]
+
 
 +
[[File:del.jpg]]
  
  
Line 29: Line 37:
  
  
[[File:del1.png]]
+
[[File:del1.jpg]]

Latest revision as of 21:52, 23 September 2013

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.


[edit] 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