4

I have two variables in my pre block, and I need a third (a boolean) that identifies whether certain properties hold of those two:

str = "some string from a datasource";
qty = 15; //Also from a datasource

The third variable, valid, needs to be true when str is not empty and qty is greater than 0. How do I do that?

Steve Nay
  • 2,819
  • 1
  • 30
  • 41

1 Answers1

4

Oh! I just figured it out:

valid = not (str eq "") && (qty > 0);

I had some syntax errors in the rest of my ruleset; that's where the trouble was coming from.

Steve Nay
  • 2,819
  • 1
  • 30
  • 41