Check if XML variable contains numeric

Hi,

after folder capture I want to check if the xml variable contains a numeric value.
write a true or false statement to a variable.
true will continue the workflow, false will place these files in a seperate folder.

What is the best way to approach this issue.

solved it already :slight_smile:

var x = Watch.GetJobInfo(9).match(/\d/g);
//var typeDictionary = Watch.GetVariable(x)

if (x === null){
Watch.SetJobInfo(8, false);
} else {
Watch.SetJobInfo(8, true);
}

Watch.Log("Jobinfo 9’s value is: " + x, 2);

You could have added a script as a condition as well.

This way, you do not need to set a condition after your script in order to conditionally branch. You could do it directly in the script, which becomes your conditional branch. :wink: