4D v13.4LISTBOX INSERT COLUMN FORMULA |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
LISTBOX INSERT COLUMN FORMULA
LISTBOX INSERT COLUMN FORMULA
The LISTBOX INSERT COLUMN FORMULA command inserts a column into the listbox designated by the object and * parameters. The LISTBOX INSERT COLUMN FORMULA command is similar to the LISTBOX INSERT COLUMN command except that it can be used to enter a formula as the contents of a column. This type of contents can only be used when the “Data Source” property of the list box is set to Current Selection or Named Selection (for more information about this, please refer to the Managing List Box Objects section). Note: This command does nothing if it is applied to the first column of a list box displayed in hierarchical mode. If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a variable. In this case, you pass a variable reference instead of a string. For more information about object names, please refer to the Object Properties section. The new column is inserted just before the column designated by the colPosition parameter. If the colPosition parameter is greater than the total number of columns, the column will be added after the last column. Pass the object name of the inserted column in the colName parameter. The formula parameter can contain any valid expression, i.e.:
At the moment the command is called, the formula is parsed then executed. Note: Use the Command name command in order to define formulas that are independent from the application language (when they call on 4D commands). The dataType parameter can be used to designate the type of data resulting from the execution of the formula. You must pass one of the following constants of the “Field and Variable Types” theme in this parameter:
If the result of the formula does not correspond to the expected data type, an error is generated. In the headerName and headerVar parameters, pass the object name and variable of the column header inserted. In the footerName and footerVar parameters, you can also pass the object name and variable of the footer of the inserted column. If you omit the footerVar parameter, 4D uses a dynamic variable. Note: Object names must be unique in a form. You need to make sure that the names passed in the colName, headerName and footerName parameters are not already used. Otherwise, the column is not created and an error is generated. We want to add a new column to the right of the list box that will contain a formula which calculates an empolyee's age: vAge:="Current Date-[Employees]BirthDate)\365" |
PROPERTIES
Product: 4D
INDEX HISTORY
SEE ALSO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||