Conditional confirmation rule with annotation evaluation
Hello Community,
I have a puzzler for you. My confirmation rule is set to evaluate a data intersection. If the intersection is greater than zero, then an annotation is required in another intersection.
I have tested both of the intersections in a quick view to ensure I have identified the correct data intersection members.
When tested, the rule identifies the numeric intersection (first condition), delivers the error message, but does not identify the annotation intersection as being present. Below is the rule:
'Check an Account value and if it is greater than zero, request a comment be made to a Cube View under the Analysis section of this page
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("Cb#Consol:E#" & api.Pov.Entity.Name &":T#WFPrior3:C#Local:S#Actual:V#YTD:A#9610:F#EndBalInput:O#BeforeAdj:I#None:U1#Admin:U2#Top2:U3#TLOB:U4#None:U5#None:U6#None:U7#USGAAP:U8#None").cellAmount
If args.ConfirmationRuleArgs.DisplayValue = 0 Then
Return True
Else
'We failed the value test, check for a comment
If api.Data.HasDataAttachments("Cb#Consol:E#" & api.Pov.Entity.Name &":S#Actual:T#WF:V#Annotation:C#Local:A#9610:F#EndBalInput:O#BeforeAdj:I#None:U1#Admin:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#Local_JE:U8#None") Then
'A comment has been made, so pass the rule
args.ConfirmationRuleArgs.Info1 = "Comment made"
Return True
Else
'File not found, we fail
args.ConfirmationRuleArgs.Info1 = "Comment Missing. View the Required Commentary Cube View under Analysis and add a comment to Account 9610."
Return False
End If
End If
Any suggestions are greatly appreciated.
Thanks!
Dena
Hi - can you try:
Dim dcAnnotation As String = api.Data.GetDataCellex("MemberFilter").DataCellAnnotation If dcAnnotation = "" Then 'Fail Else 'Pass End If
You could also use this to log the annotation to see if it is returning something which may help troubleshoot.