1
Solved

Variable Add/Subtract doesn't behave as documented

Without using AutoTools Regex I find no easy way to test if a variable is all numeric or not. So I tried Variable Add with an increment value of zero but instead of being ignored as the documentation says, it ends with an error and terminates the task. May I suggest that the two actions be allowed to continue in case of an error, and the documentation be changed accordingly.

3 replies

S

Yes :) 

(Sorry for a late response.)

Thank you! :) Updated documentation!

S

Ops, never thought about IF Regex, silly me - again!

Example giving error:

  1. Variable Set %abc To abc 
  2. Variable Add %abc Value 0

-> Error 1

The documentation says that in this case the action has no effect and a warning is flashed, neither being true.

Cheers!

Staffan 

Thanks! To clarify, the documentation should say that the action ends in error (and don't mention the flash) right? I'm guessing that the original developer changed this behaviour but never changed the documentation :)

I just tried it on a non-existing variable and it worked for me without an error. Can you give me an example that ends in error?

By the way, you can use an If Matches Regex to check if it's a number :)

Topic is closed for comments