How to validate an account? If number is less than 0 while importing TB then throw error

Yashwant
New Contributor III

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

1 ACCEPTED SOLUTION

Henning
Valued Contributor

Hi Yashwant,

The easiest way is to add a "Confirm" step to your import Workflow step:

Henning_0-1672237935921.png

(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:

Henning_1-1672238427724.png

 

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.

View solution in original post

2 REPLIES 2

Henning
Valued Contributor

Hi Yashwant,

The easiest way is to add a "Confirm" step to your import Workflow step:

Henning_0-1672237935921.png

(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:

Henning_1-1672238427724.png

 

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.

Yashwant
New Contributor III

Thanks a lot Henning!!. Your solution worked. 

I don't have GolfStream application.Check for AS7010 account.jpg

 

Regards,

Yashwant