12-23-2022 07:02 AM - last edited on 05-02-2023 10:33 AM by JackLacava
Hello All,
How to add validation for an account while importing TB. Condition is that, number should be > 0 then allow.
If 'account code' < 0 then throw error and validation should fail or show error message
Thank You.
Regards,
Yashwant
Solved! Go to Solution.
12-28-2022 09:46 AM
Hi Yashwant,
The easiest way is to add a "Confirm" step to your import Workflow step:
(ensure to create a Confirmation Rule profile that has your to be created rule in it and attach it to the workflow)
If you need help setting up confirmation rules, there is a chapter called "Confirmation Rules" in the OneStream Design & Reference Guide. You will also find examples in GolfStream, if you have access to it. Here is one you may be able to use:
In your case it might look e.g. like this:
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("A#YourAccount:F#Top:U1#Top:U2#.........").cellAmount
If args.ConfirmationRuleArgs.DisplayValue < 0 Then
Return False
Else
Return True
End If
There are a few more settings to possibly consider, but I assume that you only need an general direction to continue your work.
12-28-2022 09:46 AM
Hi Yashwant,
The easiest way is to add a "Confirm" step to your import Workflow step:
(ensure to create a Confirmation Rule profile that has your to be created rule in it and attach it to the workflow)
If you need help setting up confirmation rules, there is a chapter called "Confirmation Rules" in the OneStream Design & Reference Guide. You will also find examples in GolfStream, if you have access to it. Here is one you may be able to use:
In your case it might look e.g. like this:
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("A#YourAccount:F#Top:U1#Top:U2#.........").cellAmount
If args.ConfirmationRuleArgs.DisplayValue < 0 Then
Return False
Else
Return True
End If
There are a few more settings to possibly consider, but I assume that you only need an general direction to continue your work.
12-29-2022 04:00 AM
Thanks a lot Henning!!. Your solution worked.
I don't have GolfStream application.
Regards,
Yashwant