Customer Portal

Compare data does not get all data

Comments 2

  • Avatar
    dpavlis
    0
    Comment actions Permalink
    It looks like you are comparing not numbers, but strings - you have your variables defined as string variables. When comparing strings, you get "100" lover than "90" simply because it looks at the first chars of each string "1" & "9" in this case and decides that 1 is less than 9.
    In order to fix it, covert your string representation of value to a number first (eg. str2integer() function) and then do the comparison.
  • Avatar
    codehoper
    0
    Comment actions Permalink
    Thank you that worked.

    Now I need to modify this so that it will work for both a string and integer.

Please sign in to leave a comment.