Changing Fields Depending On Data 追蹤

0

Hi 

 

I'm trying to write a script (shown below), of If the field is equal to a specific value

 

Set it as 1 field otherwise another, but it doesn't seem to like me setting different fields

 

Can any one help me out here ?

 

ReferenceField("STPRT_BU_PARTNER")

 
If Mid(Field("STPRT_BU_PARTNER"),2,6) ="005241" then 
  Value = Field("UPCOUTER")
Else
  Value = Field("PRODUCTNO_EXT")
End If
 
 
Thanks

2 意見

0
Avatar
Fernando Ramos Miracle
版主
評論操作 永久連結

I can see you've declared the field "STPRT_BU_PARTNER" with the ReferenceField() command, but not the other two fields. Might that be the problem? Apart from that I don't see where the problem might be.

 

Could you let me know on what type of event are you adding this VB script (onProcessData, OnNewRecord...)?

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

Hi Fernando,

 

Thanks for the reply,

 

I'm just selecting the type as VBScript, I'm don't think you need to select an event

 

Thanks

登入寫評論。