project BLF > class Database Component > method GetCustomFieldList
Description
Returns a list of available custom fields
Parameters
ocFieldList | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/database.p)
<M-1 run DataDescription
(input '' (icRowids),
input '' (icPkey),
input '' (icObjectIds),
input yes (ilAllTables),
output viFcReturnSuper (oiReturnStatus)) in database>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-2 run DefineCustomRelations (output viFcReturnSuper (oiReturnStatus)) in database>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
for each tFcDynRel on error undo, throw:
do viFcCount1 = tFcDynRel.thFcBuffer:num-fields to 1 by -1:
vhTTField = tFcDynRel.thFcBuffer:buffer-field(viFcCount1).
vcFieldName = vhTTField:name.
if tFcDynRel.tcFcTo begins "CustomTable"
then vlFcOk = can-find (first tCustomRelation where
tCustomRelation.tcChildTable = "t" + tFcDynRel.tcFcTo) and
not vcFieldName begins "tc_".
else vlFcOk = (vcFieldName begins "CustomShort":U
or vcFieldName begins "CustomCombo":U
or vcFieldName begins "CustomLong":U
or vcFieldName begins "CustomNote":U
or vcFieldName begins "CustomDate":U
or vcFieldName begins "CustomInteger":U
or vcFieldName begins "CustomDecimal":U
or vcFieldName begins "QADC0":U
or vcFieldName begins "QADD0":U
or vcFieldName begins "QADT0":U).
if vlFcOk
then assign ocFieldList = ocFieldList + ",t":U + tFcDynRel.tcFcTo + ".":U + vcFieldName.
end.
end.
assign ocFieldList = substring(ocFieldList,2,-1,"CHARACTER":U).
empty temp-table tCustomRelation.