Topic Options
#56151 - 07/26/18 06:30 PM Workflow VBScribt condition help
Karlie Offline
OL Toddler

Registered: 09/05/11
Posts: 33
Loc: New Zealand
Hi there,

I am trying to rename a file using the below VBScript. It doesn't seem to be working, can you help me find where I am going wrong? cheers

if Watch.GetJobInfo(8) =< 900 then
Watch.SetVariable "FileName", "Name_1"
Watch.SetVariable "FileName", "Name_2"
end if

Basically Jobinfo 8 is a numerical number,
if Jobinfo 8 is less than or equals to 900,
then Set variable "FileName" as "Name 1",
else Set variable "FileName" as "Name_2"

The "FileName" Variable is later used to name a file.


Edited by Karlie (07/26/18 06:33 PM)

#56154 - 07/27/18 07:33 AM Re: Workflow VBScribt condition help [Re: Karlie]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1928
Loc: Objectif Lune, Montreal, Qc
You state it doesn't seem to be working, but you don't mention what actually occurs. Do you get an error message? Does JobInfo(8) get set to the expected value in the script?

Add the line
Watch.Log "Jobinfo(8) set to: " & Watch.GetJobInfo(8),2
as the last line in your script to display the value of JobInfo(8) after the script has run.

Then run your process in step-by-step mode.

You could also add the same logging message at the start of the script, to see the value of JobInfo(8)
it runs.
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen