Topic Options
#57649 - 08/28/20 03:55 PM VB script is not working
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 393
Loc: Home
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"


Edited by Sami786 (08/28/20 03:57 PM)
_________________________
Peace

Top
#57650 - 08/28/20 04:14 PM Re: VB script is not working [Re: Sami786]
jouberto Offline
OL Toddler

Registered: 04/18/18
Posts: 49
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.

Top
#57651 - 08/28/20 04:48 PM Re: VB script is not working [Re: Sami786]
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 393
Loc: Home
that worked, thank you
Happy Friday
_________________________
Peace

Top