VB script is not working

Posted by: Sami786

VB script is not working - 08/28/20 03:55 PM

Hi, can someone look at my VB script and let me know why it's not working.

If (("watch.getjobinfo(6)"="AB")OR("watch.getjobinfo(6)"="CD"))then
Watch.SetVariable "LocalFlag","Fixed"

Else

Watch.SetVariable "LocalFlag","Variable"
End If

I get the result "Variable" in either cases which is wrong. My data is CD and it should say "Fixed"
Posted by: jouberto

Re: VB script is not working - 08/28/20 04:14 PM

you always get false because watch.getjobinfo() cannot be between quotes. It is currently saying the string "watch.getjobinfo(6)" is not equal to string "CD", and it's right.
Posted by: Sami786

Re: VB script is not working - 08/28/20 04:48 PM

that worked, thank you
Happy Friday