Skip to main content
Solved

If Statement

  • December 20, 2022
  • 6 replies
  • 36 views

Forum|alt.badge.img+4

Hey Everyone,  Needing help with another if statement.  It is not behaving in the manner I am expecting.

 

I have 3 fields Odo calculated (Formula Field), Odo miles (Number field) and Final Odometer (If statement).  I am trying to have the Final odometer field populate with the odometer calculated field if the odometer overwrite field is empty.  If the Odometer Overwrite field is not empty I want that number to populate in the Final Odometer field.

I currently have 

IF({ODO Miles} = " ",
{ODO Miles}, {Odo Calculated})

Best answer by TheTimeSavingCo

That formula looks fine.  What's wrong with it?  Could you provide some screenshots?

6 replies

TheTimeSavingCo
Forum|alt.badge.img+31

That formula looks fine.  What's wrong with it?  Could you provide some screenshots?


pressGO_design
Forum|alt.badge.img+21

ODO Miles = Odometer Overwrite, yes? If so, then what you currently have -  IF({ODO Miles} = " "{ODO Miles}, {Odo Calculated}) - says “if the overwrite is empty, use the overwrite, otherwise use the calculation.”

What I think you want is the opposite:

IF({ODO Miles} = " ", {Odo Calculated}{ODO Miles})
or
IF({ODO Miles}, {ODO Miles}, {Odo Calculated}). 

Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • December 21, 2022

That formula looks fine.  What's wrong with it?  Could you provide some screenshots?


Adam,

Please see a screenshot.  As you can see the calculation field Odo calculated shows since the Odo Miles is empty but where the odo miles is empty.

 

 

 

 


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • December 21, 2022

ODO Miles = Odometer Overwrite, yes? If so, then what you currently have -  IF({ODO Miles} = " "{ODO Miles}, {Odo Calculated}) - says “if the overwrite is empty, use the overwrite, otherwise use the calculation.”

What I think you want is the opposite:

IF({ODO Miles} = " ", {Odo Calculated}{ODO Miles})
or
IF({ODO Miles}, {ODO Miles}, {Odo Calculated}). 

Hi I tried this equation and unfortunately it did the same thing I am experiencing with my equation.


pressGO_design
Forum|alt.badge.img+21

Hi I tried this equation and unfortunately it did the same thing I am experiencing with my equation.


Oh, because it’s not empty, it’s 0. 

IF({ODO Miles}>0, {ODO Miles}, {Odo Calculation}). 


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • January 11, 2023

That formula looks fine.  What's wrong with it?  Could you provide some screenshots?


Strange but the formula ended up working a few days later with no changes.  Must of been a glitch