Hi,
A coworker and I are having an issue where some of our scripts with REC(EXPRESSION=GET and REC(FACTOR=1.00*GET will write to the DB but others do not. An example of one which is broken is shown below, and the section which is not writing to the DB is at the end of the script, highlighted in green. We've run the Logic Debugger and we can see in the log that it's calculating properly, but it shows 12 records skipped and those are the ones we believe should be writing to the DB. We were focusing on the REC statement as the culprit, but now I'm thinking it may be the overall WHEN-IS-ELSE-ENDWHEN and COMMIT that may just not be sync'd up properly. Any help is greatly appreciated as this has been consuming us for a while now.
*INCLUDE ConstGrossRev.LGF
*XDIM_REQUIRED=ENTITY
*MEMBERSET(%ACCTS%,"Descendants([ACCOUNTFIN].[NR_Net_OP_Revenue],99,LEAVES)")
*MEMBERSET(%BUDMOS%,"Descendants([TIME].[varBUDYR.TOTAL],99,LEAVES)")
*XDIM_MEMBERSET ACTIONPLAN=<ALL>
*XDIM_MEMBERSET AFFILIATE=<ALL>
*XDIM_MEMBERSET CHARGECODE=NO_CHARGECODE
*XDIM_MEMBERSET DATASRCFIN=FROM_REIMBURSEMENT,ALLOCFIN_CA
*XDIM_MEMBERSET PROJECT=NOPROJECT
*XDIM_MEMBERSET CATEGORY=BUDGET
*XDIM_MEMBERSET TIME=%BUDMOS%
*XDIM_MEMBERSET ACCOUNTFIN=%ACCTS%,A_41000,A_41100,A_41150,A_41170,A_41200,A_41300,A_41400,A_41500,A_41600,A_41800,A_42300,A_41175,A_41350
*WHEN ACCOUNTFIN.VIS_ACCT
*IS <> ""
*REC(CATEGORY="#temp_Gross")
*ELSE
*WHEN ACCOUNTFIN
*IS="NR_HC"
*WHEN ENTITY.BU
*IS="GLENC"
*REC(ACCOUNTFIN=varGLENCtemp,CATEGORY="#temp_Net")
*IS="SSIDE"
*REC(ACCOUNTFIN=varSSIDEtemp,CATEGORY="#temp_Net")
*ELSE
*REC(ACCOUNTFIN=ACCOUNTFIN.TEMP_ACCT,CATEGORY="#temp_Net")
*ENDWHEN
*ELSE
*REC(ACCOUNTFIN=ACCOUNTFIN.TEMP_ACCT,CATEGORY="#temp_Net")
*ENDWHEN
*ENDWHEN
*GO
*WHEN ACCOUNTFIN.VIS_ACCT
*IS <> ""
*WHEN ACCOUNTFIN
*IS="A_41200"
*REC(EXPRESSION=GET(CATEGORY="#temp_Net",DATASRCFIN="FROM_REIMBURSEMENT")-
GET(CATEGORY="#temp_Gross"),ACCOUNTFIN=ACCOUNTFIN.Allow_ACCT,DATASRCFIN="ALLOCFIN_CA")
*ELSE
*REC(EXPRESSION=GET(CATEGORY="#temp_Net",DATASRCFIN="FROM_REIMBURSEMENT")-
GET(CATEGORY="#temp_Gross"),ACCOUNTFIN=ACCOUNTFIN.Allow_ACCT,DATASRCFIN="ALLOCFIN_CA")
*ENDWHEN
*ENDWHEN
*COMMIT