|
Previous Top Next |
Prototype: | (String pFieldName, String pPrefix,<String pTableName>),String |
pFieldName | Name of field/column without prefix. |
pPrefix | Prefix name without trailing colon. |
ptableName | Optional name of the table for the Field/column. |
Returns | Combined field/column name. |
This method can be used to combine a field or column name with either a prefix or a table name. This is handy when generating Clarion code where you know the table name or the prefix but have to parse out the fieldname and then later on combine them (perhaps with a different table name or prefix). See also the SplitFieldName method which does the opposite of the CombineFieldName. If the table name is omitted the prefix and fieldname are combined as Prefix:FieldName, i.e. with a colon between them. If the table name is not omitted the table name is used instead of the prefix as TableName.FieldName, i.e. with a period between them. The case of the prefix, tablename and fieldname is not changed.
Example:
ITS ITStringClass
Fn String(20)
Pf String(5)
Tn String(20)
Code
Fn = 'SysID'
Pf = 'MYF'
Tn = 'MyFile'
Message('Combined Fieldname with prefix: ' & ITS.CombineFieldName(Fn,Pf) &|
'|Combined Fieldname with tablename: ' & ITS.CombineFieldName(Fn,Pf,Tn))
See also: