project BLF > class Business Component > method CustomFields

Description

Returns the name of all active custom business fields in the class dataset.


Parameters


icTableNameinputcharacterDatabase table name
ocFieldNamesoutputcharactercomma seperated list of field names
ocFieldLabelsoutputcharacterchr(2) seperated list of user-defined labels for custom business fields, translated to current-language
oiReturnStatusoutputinteger


Internal usage


BLF
method business.GetCustomFieldValues


program code (program1/business.p)

run appinfo/classtables.p (input "", output vcFcMaskList, output vcDBTables).
if can-do (vcDBTables, icTableName)
then do:
    <Q-5 run GetCustomFieldsForTable (all) (Read) (NoCache)
          (input 't':U + icTableName, (TableName)
           output dataset tqCustomFieldsForTable) in BCustomField >
    
    for each tqCustomFieldsForTable on error undo, throw:
        assign ocFieldNames  = ocFieldNames  + ",":U  + entry(2,tqCustomFieldsForTable.tcCustomFieldFieldName,".":U)
               ocFieldLabels = ocFieldLabels + chr(2) + tqCustomFieldsForTable.tcCustomFieldColumnLabel.
    end.
    
    if ocFieldNames <> ""
    then assign ocFieldNames  = substring(ocFieldNames,2,-1,"CHARACTER":U)
                ocFieldLabels = substring(ocFieldLabels,2,-1,"CHARACTER":U).
    
    empty temp-table tqCustomFieldsForTable.
end.