The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
WillVitale
1 year agoContributor II
How to Exclude Entities from Confirmation Rule
Hello,
I'm somewhat new to writing code for confirmation rules. I'm trying to create a confirmation that is only for 1 entity and we'd like it in our general rule groups for confirmation rules and ...
- 1 year ago
Hi Will,
Can you try using the below example and adapt it for your needs? You should be able to run the confirmation rule only for 02140 and all others should return True:
Thanks,
Ioana
WillVitale
1 year agoContributor II
Thanks Ioana! That worked great. One last question. I'm trying it to pass 3 accounts where all 3 need to have values in it. Right now it keeps failing, even though I have values in those accounts. Not sure if it's the "And" that isn't working correctly, but individually the accounts work. I know I can write it out individually, but I wanted to keep it in one rule.
Dim EntityName As String = api.Pov.Entity.Name.ToString
Dim WFYear As Integer = api.Time.GetYearFromId(api.Pov.Time.MemberId)
If EntityName.Equals("02140") Then
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#8211:F#EndBalInput:O#BeforeAdj:I#None:U1#81:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_JE:U8#None").cellAmount And
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#9901:F#EndBalInput:O#BeforeAdj:I#None:U1#99:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_JE:U8#None").cellAmount And
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("Cb#Consol:C#Local:S#Actual:V#Periodic:A#TaxPmt" & WFYear & ":F#EndBalInput:O#BeforeAdj:I#None:U1#00:U2#DEF:U3#L_UNA:U4#None:U5#None:U6#None:U7#USGAAP_JE:U8#None").cellAmount
If args.ConfirmationRuleArgs.DisplayValue <> 0 Then
Return True
Else
Return False
End If
Else
'Do Not run the rule for other entities (Set Bypass to True)
args.ConfirmationRuleArgs.Bypass = True
End If
Thanks,
Will
Related Content
- 2 years ago
- 2 years ago
- 2 years ago