Discussions

Expand all | Collapse all

Help in using ""<>"" in a formula.

  • 1.  Help in using ""<>"" in a formula.

    Posted 04-20-2018 20:24
    I am trying to find mismatches when comparing two fields. The [TO_iM_StaticPressureCFM] is numeric field while the [TO_CalculatedCFM] field is a formula - numeric field. The below script is not working correctly. I guess I am not using the "<>" correctly.

    If([Customer - Related Client]=3 and [AirFlowMethodID]=2 and [TO_iM_StaticPressureCFM]<>[TO_CalculatedCFM],"Does not match"&"\n")&

    Thanks


  • 2.  RE: Help in using ""<>"" in a formula.

    Silver
    Contributor
    Posted 04-20-2018 20:28
    That last ampersand, if you really do have it, should go.


  • 3.  RE: Help in using ""<>"" in a formula.

    Top
    Contributor
    Posted 04-23-2018 13:58
    HI Stephen,

    When that formula is not working correctly are you getting a specific error message back when trying to save or are you getting a wrong output?


  • 4.  RE: Help in using ""<>"" in a formula.

    Posted 04-24-2018 13:42
    Evan,

    I am not getting an error message. I am getting the wrong results it is returning matches and I want to see mismatches.

    Thanks
    Stephen


  • 5.  RE: Help in using ""<>"" in a formula.

    Top
    Contributor
    Posted 04-24-2018 14:00
    What type of fields are [TO_iM_StaticPressureCFM] and [TO_CalculatedCFM]


  • 6.  RE: Help in using ""<>"" in a formula.

    Posted 04-24-2018 14:03
     [TO_iM_StaticPressureCFM] is a numeric field and [TO_CalculatedCFM] is a formula - numeric field.


  • 7.  RE: Help in using ""<>"" in a formula.

    Top
    Contributor
    Posted 04-24-2018 15:20
    Hi Stephen,

    Does that formula numeric use any rounding? If you go into that field and set the decimal place to 14 do you see any trailing decimal points for that calculation? Sometimes due to rounding numbers can appear the same but are stored as different, essentially one might be 2.5 and the other might be 2.50000134 and that 134 is still logged by the formula but not displayed due to the field settings. Expanding the decimal place manually can help to assure that isn't happening and causing inconsistent results. 


  • 8.  RE: Help in using ""<>"" in a formula.

    Posted 04-25-2018 01:04
    Evan,

    Thanks for the information and I was able to prove your theory. I did not see everything after the decimal point because of the field settings.
    Thanks.


  • 9.  RE: Help in using ""<>"" in a formula.

    Top
    Contributor
    Posted 04-25-2018 13:39
    Hi Stephen,

    I am glad I was able to help. I have ran into that myself a number of times with numeric formulas, Quick Base at times will hide those small decimal places and it can be confusing to figure out where the mismatch is. If you are looking to still use the comparison for your formula you can apply a rounding to your formula field via the Round function to force it to round the results to the decimal place you would like. Thank you and have a great day!