0

I'm getting an error message with this formula but can't see the wood for the trees of what's missing - please help!

if {vehinv_rec.master_class_2} = "RCV" and if {vehinv_rec.chassis_model} in ["DF01", "DF02", "DF03", "DF04", "DF05", "DF06", "DF07", "DF08", "DF09", "DF10", "DF11", "DF12", "DF13", "DF14", "DF15", "DF16", "DF17", "DF18", "DF19", "DF20", "FAD2", "AN1", "AN2", "ANT", "ME4"] then "Uncompliant" else if {vehinv_rec.master_class_2} = "RCV" and {vehinv_rec.gvw_kg} > 18000 then "Compliant" else "Out of Scope"

I keep getting an error saying THEN is missing, but I can't see where?

1
  • Please provide enough code so others can better understand or reproduce the problem. Commented May 17, 2024 at 9:25

1 Answer 1

0

You have a syntax error. You wrote the formula as:

IF arg1 AND IF arg2 THEN...

Instead, try it as:

IF arg1 AND arg2 THEN...

When you repeated the keyword IF in the evaluation of arg2 the compiler/parser saw that as beginning a new IF statement without completing the first one.

Sign up to request clarification or add additional context in comments.

1 Comment

Fantastic thank you - works a treat now!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.