How to set valid if rule based on another field

I’m trying to run the following Valid IF but I’m getting the error below:

If the type field is ROUTE COMPLETE, then the Fuel Cost field is valid if its >0 but less than 1000. The field could otherwise be 0 or >0 but less than 1000.

You may wish to try below

OR(
AND([Type]=ROUTE_COMPLETE, [_THIS]>0, [_THIS]<1000),

AND([_THIS]>=0, [_THIS]<1000)
)

2 Likes

There is no => operator, which renders this expression invalid.
image

4 Likes

Good catch @Steve.

2 Likes

Thank you Suvrutt, this worked perfectly!

2 Likes

Got it. Very helpful. Thanks Steve

2 Likes

Just checking, => is invalid but >= works, correct?

I use >= all over the place in my app.

1 Like

Yes you’re right. Greater/Less than symbol before equal symbol is the correct format;)

2 Likes

Yes.

1 Like