CDF handling overview
In some areas of the application there is a requirement
to add easy and for free Customer Defined Fields.
This fields solve the business requirements of (a group of)
customers, but their need is not generic enough for deployment
in the standard. Free Customer Defined Fields could help
a customer to store his specific data requirements without
having to customize the system. The information in the CDFs
are, when possible, carried forward through the business process.
For instance when customer specific data is stored on the requisition
header it should be carried forward when the requisition is turned
into a purchase order and finally into an invoice.
Restrictions
The following restrictions on CDFs are imposed:
There can not be references on a CDF
There can not be permissions on a CDF
There can not be indexes on a CDF
It is not possible to have an array column defined as CDF
A CDF can not be defined as a MLF
----------------------------------------------------------------
rdi.table.column()
Syntax:
function long rdi.table.column (string table_name(9), long column_number,
ref string column_name, ref string domain_name(14), ref long offset,
ref long size, ref long dept, ref long type, ref long flag,
ref long default_value [, long flag_filter])
Description
This returns information about a specified column which is identified
by the table name and the column number. Note that the first columns
in the table are reserved for the following columns: Refcntd, Refcntu,
_compnr, _dlock, and _index<number> (one column for each index).
Arguments
string table_name(9) The name of the table in which the column occurs (omit the leading 't').
long column_number The column number.
ref string column_name This returns the name of the column.
ref string domain_name(14) This returns the name of the column's domain.
ref long offset This returns the position of the column in the row.
ref long size This returns the size of the column, in bytes.
ref long dept This returns the depth of the column (array columns only).
ref long type This returns the database type of the column. For example, DB.LONG, DB.FLOAT, and so on.
For a list of all possible database types, see Database handling overview.
ref long flag This returns a bit pattern that represents one or more of the following values:
DB.ARRAY
DB.CDF
DB.CHILD
DB.FILLED
ref long default_value This returns the default value of the column.
[long flag_filter ] This optional argument can be used to get a filtered list
of columns that have the specified flag set.
For example, the 2nd CDF column from a table can be retrieved by callimg
this finction with column_name = 2 and flag_filter = DB.CDF
Return values
0 success
-1 error
Context
This function can be used in all script types.
------------------------------------------------------------------------------------------