How To Change Object Value Based On Another Object 追蹤

Legacy Poster



I'm trying to tell Bartender to add 20% to the price value of a label if the taxcode connected to the price is equal to 2853. If it is 2852, then no adjustments are to be made to the price.


I've given the tax code object a data source name of  "TaxCode" 


If Format.NamedSubStrings("TaxCode").Value = "2583" Then
Value = Value * 1.2
value = FormatCurrency(value)
Value = value * 1
value = FormatCurrency(value)
End If

This is the code I've been trying so far but no no avail.


Can anyone help out? =D

1 意見

Shotaro Ito
評論操作 永久連結

If you're entering the script on OnProcessData event, the script itself looks fine.

However when datasource is not number, it causes script error. To avoid, you can add line below at the top of your script.

If Not IsNumeric(Value) Then Exit Sub