project BLF > class BScanDaemon > method Calculate
Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bscandaemon.p)
<ANCESTOR-CODE>
for each tScanDaemonLocation:
if vlDataLoadKeepPrevious and can-find (tAlreadyCalculatedRecords where
tAlreadyCalculatedRecords.tcTableName = "ScanDaemonLocation" and
tAlreadyCalculatedRecords.tc_Rowid = tScanDaemonLocation.tc_Rowid)
then next.
if tScanDaemonLocation.Company_ID = 0
then assign tScanDaemonLocation.tcCompanyDescription = "".
else do:
<Q-1 run CompanyByAll (all) (Read) (NoCache)
(input tScanDaemonLocation.Company_ID, (CompanyId)
input ?, (CompanyCode)
input ?, (CompanyIsActive)
output dataset tqCompanyByAll) in BCompany >
find first tqCompanyByAll where
tqCompanyByAll.tiCompany_ID = tScanDaemonLocation.Company_ID no-error.
if available tqCompanyByAll
then assign tScanDaemonLocation.tcCompanyDescription = tqCompanyByAll.tcCompanyDescription.
end.
end.