Description

Creates or redefines calculated (symbolic) columns in a native table dictionary.

Syntax

Create_Symbolic (tablename, columnname, formula, datatype, columnheading, multivalueflag, conversion, justification, length, description)

Parameters

The Create_Symbolic routine has the following parameters.

ParameterDescription
tablenameName of table in which the calculated column is to appear.
columnnameSpecifies the name of the symbolic column to create or redefine. Column names must comply with rules for key values.
FormulaThe formula to execute when columnname is referenced. The formula is written using any valid BASIC+ expressions. The symbolic formula does not conform to rules defined for creating stored procedures.

Note: Multiline formulae should be delimited by either @vm or @fm.

datatypeThe data type assigned to the column. If datatype is provided, the information associated with the data type, conversion, justification, and length, are automatically provided. If null, conversion, justification, and length must be provided in the appropriate arguments.
columnheadingThe heading for the symbolic column. If null, the default is columnname.
multivalueflag

Specifies whether this column is single valued or multi-valued. If null, the default is single valued (S). Specify one of the codes listed below.

ValueDescription
SSingle valued.
MMulti-valued.
conversionThe output format for the return data. If conversion and datatype are null, then no conversion is performed. If datatype is provided, the default is dependent on the data type assigned. See also, Oconv function.
justification

The justification for the return data. If justification and datatype are null, the default is left (L) justified. If datatype is specified, justification defaults to the justification for the data type. Specify one of the values below.

ValueDescription
LLeft justified.
RRight justified.
TLeft justified, text mark delimiters inserted at length intervals.
lengthThe length for the return data. If length and datatype are null, length defaults to a length of 20. If datatype is specified, length defaults to the length for the data type.
descriptionText describing the symbolic column.

See also

List_Dict

Example

* This code example creates a symbolic field named "TAX" in the ORDERS table within the EXAMPLES application
Declare Subroutine Create_Symbolic, Set_Status, FsMsg
Declare Function Get_Status
table = "ORDERS"
column = "TAX"
formula = "@ans = ''" : @vm : "@ans = {SUB_TOTAL} * .07" @fm
dType = "DOLLARS"
colHead = "Tax"
mvFlag = ""
conv = ""
just = "R"
length = 15
descr = "Calculate tax on Orders"
errCodes = ""
Set_Status(0)
Create_Symbolic(table, column, formula, dType, colHead, mvFlag, conv, just, length, descr)
If Get_Status(errCodes) Then
* Error Handling
FSMsg(errCodes)
end
  • No labels