Forum Discussion
- T_KressContributor III
You should be able to add an IF statement to your conformation rule to exclude a particular entity. You would dim out the current entity and add an IF statement to exclude that entity from whatever portion of your confirmation rule you desire here:
- BobNelsonNew Contributor III
Teresa,
I couldn't see where the code example you attached contained reference to an entity, so I attached the code snippet above.
- BobNelsonNew Contributor III
Do you have an example to post as it relates to a specific entity? I'm imagining that if this were a one-off with a specific entity, or set of entities, then hardcoding entity names in the IF statement would be OK?
- MiaGELNew Contributor
The code is:
'Rule To ensure that all numbers entered in the disposal column (ROU)are negative.
Dim myBalanceValue As Decimal = api.Data.GetDataCell("Cb#FinancialRptg:C#Local:V#YTD:A#ROUAssetNet:F#DIS:O#Top:I#None:U1#Top:U2#Top:U3#Top:U4#Local_Stat_TB").cellAmount
args.ConfirmationRuleArgs.DisplayValue = myBalanceValueDim chkVal As Long
chkVal = args.ConfirmationRuleArgs.DisplayValueIf args.ConfirmationRuleArgs.DisplayValue <= 0.00 Then
Return True
Else
'args.ConfirmationRuleArgs.Info1 = "ROU Disposals has a positive amount"
'args.ConfirmationRuleArgs.Info2 = chkVal
Return False
End If
- BobNelsonNew Contributor III
Below is a code snippet from a client of mine. When you want to execute on only one or two entities, or when you want to exclude only one or two entities, I've put this IF statement at the beginning of the confirmation rule.
Related Content
- 12 months ago