CellStatus retrieves a different status than shown in the Cube View
Hi all,
I'm trying to build a CV with Entities on rows and Scenarios on columns that will show the status of the cell with the help of a Dynamic Calc.
Here's the aspect of the CV (Scenario and UD8 on columns):
TEST is my dynamic calc (also crossed with V#Annotation so it can display text). As you can see, I can write on U8#None and yet the dynamic calc returns READ.
Here's my code:
Dim sEntName As String = api.Pov.Entity.Name
Dim sScnName As String = api.Pov.Scenario.Name
Dim sStatus As String = Api.Data.GetDataCell("Cb#CORP:E#" & sEntName & ":C#Local:S#" & sScnName & ":T#2018M1:V#YTD:A#ADDUG:F#None:O#Forms:I#None:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None").CellStatus.ToString
brapi.ErrorLog.LogMessage(si,"sStatus = " & sEntName & " - " & sScnName & " - " & sStatus)
If sStatus.XFContainsIgnoreCase("WriteAccess: False") Then
Return "READ"
Else
Return "WRITE"
End If
Here's the POV of the first cell (on E#3002:S#Actual):
Cb#CORP:E#3002G0:P#?:C#Local:S#Actual:T#2018M1:V#YTD:A#ADDUG:F#None:O#Forms:I#None:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None
And this is the Cell Status shown in the CV:
However, the CellStatus that I'm retriving with my Dynamic Calc says the following (I highlight the incongruences in RED😞
Description: sStatus = 3002G0 - Actual - StoredBits: 33, DerivedBits: 264, ExistenceType=IsRealData, StorageType=Input, NoDataZeroViewOverride: Default, Invalid: False, Error: False, IsDefaultFreq: False, ReadOnly: True, ReadAccess: False, WriteAccess: False, CanCalculateFromGrids: False, IsLocked: False, IsFromCalcScript: True, IsDynamicCalc: False, IsCalcStatus: False
Does anybody have any clues why the CellStatus looks different between the script and the CV?
Thanks,
GSF
I wonder if you dimed the cell status as a True or False Boolean like this:
Dim isReadonly = BRApi.Finance.Data.GetDataCellUsingMemberScript(si,"Your YourCube","YourCellPOV").DataCellEx.DataCell.CellStatus.ReadOnly If Not isReadonly Then Whatever you want to do End If
If it would behave differently?
I am doing something similar and it is working for us.