0

if/then/else

I have a field named "Units number", I want to create a new fx field to define the units to consider by yes and no like this:

if "Units number" > 2 then "yes" else "no" end

but the result is "no" in all cases even if the number is >2

Any help ?

6 replies

null
    • Nick
    • 3 yrs ago
    • Reported - view

    Use single quotes for the field names:

     

    if 'Units number' > 2 then "yes" else "no" end

    • Garantie de construction résidentielle
    • Plans
    • 3 yrs ago
    • Reported - view

    Not in french ! It doesn't work.

    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    Is your 'Units number' field a text field?

    • mediabim
    • 3 yrs ago
    • Reported - view

    No, a number

    • Nick
    • 3 yrs ago
    • Reported - view

    It works for me...

    Try something else:

    - Change your field name to Units_Number (without a space) and use this code:

    ---

    if Units_Number > 2 then "yes" else "no" end

    ---

    • Garantie de construction résidentielle
    • Plans
    • 3 yrs ago
    • Reported - view

    Good, it works !

    Thank you, Nick !

Content aside

  • 3 yrs agoLast active
  • 6Replies
  • 691Views