| 4D v20WP Table insert columns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v20
 WP Table insert columns 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WP Table insert columns ( targetObj | {tableRef ; colNumber} {; numColumns} ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| targetObj | Object |   | Range or element or 4D Write Pro document | |||||
| tableRef | Object |   | Table reference | |||||
| colNumber | Longint |   | Column number | |||||
| numColumns | Longint |   | Number of columns to insert (default value = 1) | |||||
| Function result | Object |   | Range of table columns | |||||
The WP Table insert columns command inserts one or several column(s) into a 4D Write Pro table.
This command supports two syntaxes:
The optional numColumns parameter defines the number of columns to insert into targetObj or tableRef. By default, if this parameter is omitted, one column is inserted.
Result
The command returns a column range representing inserted column(s), or Null if nothing was inserted. 
You want to insert three columns after first column in the Invoice table. This code:
 C_OBJECT($column)
 C_OBJECT($table)
 
 $table:=WP Get element by ID(WParea;"Invoice") //retrieve "Invoice" table
 
 $column:=WP Table insert columns($table;2;3) //position 2, add 3 columns
Will insert the new columns at the correct location:

	Product:  4D
	Theme:  4D Write Pro Language
	Number:  
        1692
        
        
        
	
	Created:  4D v18
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Write Pro Reference ( 4D v20)
	
	
	
 Add a comment
Add a comment