Vb Script Help Needed 追蹤

0
Avatar
Legacy Poster

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

2 意見

0
Avatar
Legacy Poster
評論操作 永久連結

SORTED!

 

The script needed to be on a single line to work.

 

(posted for anyone else is having the same issue.

0
Avatar
Hao Wu
評論操作 永久連結

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 If

登入寫評論。