Vb Script Help Needed
I am trouble with a simple coding in Bartender. I want to select the Country if a postcode does not exist. I have tried "If...Then" statements and also "If...Then...Else" statements. I have also tried NULL, EMPTY, ¬, " " and "". I can't seem to get any of them working. I have tried using data source, the transformes tab and also "OnSelectedEvent".
If Field("SALESTABLE.DELIVERYZIP") = NULL Then Value = Field ("SALESTABLE.DELIVERYCOUNTRY") End If
The error I get is that it only shows instances with a postcode and the script error (#5901) states The Script did not read from the "Value" property, which means that the currently specified data source was completely ignored. This may be what you have intended.
The same happens the other way round using DELIVERYCOUNTRY first and DELIVERYZIP second so I know that the correct fields are stated.
Please help!
Thanks
-
SORTED!
The script needed to be on a single line to work.
(posted for anyone else is having the same issue.
0 -
I got the same error when using the code below,don't know how to fix it.
If Len(Format.NamedSubStrings("soqlDateCodeBarCode").Value) > 0 Then
Value = "Date Code:"
Else
Value = "Delivery Date:"
End If0
請登入寫評論。
評論
2 條評論