Forum Discussion
I wasn't investigating it, but did you try:
Dim myCell As DataBufferCell
myCell.CellStatus.Invalid
Hi Christian,
thank you for the hint... but apparently this does not work.
'Here I define a target cell, replacing the soure account with the plug, where the target flow is not valid. Then I used CellStatus.Invalid to determine the whether the target cell is valid (which is not).
Dim targetcell As New DataBufferCell(cell)
targetcell.SetAccount(api, PlugAcc)
api.LogMessage(" OK1 invalid " & cell.CellStatus.Invalid & " " & cell.DataBufferCellPk.GetMemberScript(api) )
api.LogMessage(" Ko1 invalid " & targetcell.CellStatus.Invalid & " " & targetcell.DataBufferCellPk.GetMemberScript(api) )
'This is what OS prints, both seem to be valid (Invalid = FALSE)
OK1 invalid False A#23411021:F#F015:O#Import:I#VAAG:U1#GBBAHNOTHER:U2#Package:U3#AUT:....
Ko1 invalid False A#21558311:F#F015:O#Import:I#VAAG:U1#GBBAHNOTHER:U2#Package:U3#AUT ....
'But if I actually check wether the flow is within the contraint, OS correctly highlights it's not. Of course, doing something like that for all dimension would not be very efficient, considering that i want to log this during a consolidation / allocation process
Dim tCellFlowValid As Boolean = api.Account.IsFlowICOrUDMemberWithinConstraintMember(targetcell.DataBufferCellPk.AccountId, BRApi.Finance.Dim.GetDimPk(si, "cFlow"), targetcell.DataBufferCellPk.FlowId )
Dim sCellFlowValid As Boolean = api.Account.IsFlowICOrUDMemberWithinConstraintMember(cell.DataBufferCellPk.AccountId, BRApi.Finance.Dim.GetDimPk(si, "cFlow"), cell.DataBufferCellPk.FlowId )
api.LogMessage("Flow Valid Source: " & sCellFlowValid & " FlowValid Dest: " & tCellFlowValid)
'PRINTED:
Flow Valid Source: True FlowValid Dest: False
Do you believe I did something wrong or this "Cellstatus.invalid" thing is meant for something else?
Related Content
- 8 months ago
- 3 years ago
- 2 years ago