RAD expression rtecall and rinit
Can anyone help me to explain what the following code does?
$L.void=rtecall("rinit", $L.rc, $opt.tempci, "optTempCIAsset");
And also If i created a new field in the dbdict , do i need to create a new variable in the $L.rc or $opt.tempci too?
That rtecall does initialize the variable $opt.tempci with the struture (dbdict fields) of optTempCIAsset file. So, you don't need to modify this statement even if you add a new field to the optTempCIAsset table.
$L.success.flg=rtecall($L.fnc.name, $L.return.code, $L.file, $L.filename)
Parameter Data Type Description
$L.success.flg Logical Indicates if the function was successful
$L.fnc.name String Name of the sub-function to call, in this case “rinit”
$L.return.code Number Provides a more detailed return code
$L.file File File handle that will be initialized
$L.filename String Name of the dbdict to initialize
$L.success.flg=rtecall(“rinit”,$L.return.code, $L.file, “operator”)
If the $L.success.flg is false, the function failed. If it is true, the function succeeded.
$L.rc is the return code on whether the rtecall was successful.
$opt.tempci is the variable for holind the new record of optTempCIAsset. if your new field was created correctly in dbdict, it will be accessible from the $opt.tempci variable as it pulls the info from the dbdict.