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
Ioana
1 year agoNew Contributor III
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
- WillVitale1 year agoContributor II
Hi Ioana,
Thank you for the reply. I also was able to do something similar for what you did below.
' To check if Entity equals 02140 If api.Pov.Entity.Name <> "02140" Then Return True ElseIf 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 Then If args.ConfirmationRuleArgs.DisplayValue <> 0 Then Return True Else Return False End If End IfMy question to you now is, the 3rd args.ConfirmationRuleArgs.DisplayValue with account TaxPmt|WFYear|. OS doesn't like parameter in it. Currently I have the cube view set up to be dynamic, so when an user goes to that cube view in their WF, the account would automatically update to the correct year. So if they went back to 2022, it would change to TaxPmt2022 and when they move to WF year 2025, it will change to TaxPmt2025.
Is there a similar way to do this for Confirmation Rules?
Thanks,
Will
- Ioana1 year agoNew Contributor III
Can you include in the confirmation rule the following?
Dim WFYear As Integer = api.Time.GetYearFromId(api.Pov.Time.MemberId)And then replace A#TaxPmt|WFYear| with A#""TaxPmt"& WFYear &". Check if this works.
Thanks,
Ioana
- WillVitale1 year agoContributor II
Hi Ioana,
I got an error when I ran the confirmation rule. It did show TaxPmt2025, but for some reason there's an extra quote mark in front of TaxPmt.
I did try remove some of the quotes, but kept giving me errors when I was validating the script.
Will
Related Content
- 2 years ago
- 2 years ago
- 2 years ago