Problem with gotoIf command if the value is more than 5 digit (Specifically b/w 100000-199999)

You are comparing strings, that is why 78000 “wins” against 104000 :wink:

=> The solution is to use “ParseInt” before comparing the values.

In the screenshot, note that variables that have a string as content have the "" quotation marks (here: variables A and B) and variables with numbers do not have "" (here: C_is_number).

{
  "Name": "compare_numbers",
  "CreationDate": "2024-7-31",
  "Commands": [
    {
      "Command": "label",
      "Target": "Start",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "104000",
      "Value": "A",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "80000",
      "Value": "B",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number (Number (${A})*0.75) .toFixed(2)",
      "Value": "B",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return parseInt((Number (${A})*0.75) .toFixed(2))",
      "Value": "C_is_Number",
      "Description": ""
    },
    {
      "Command": "if",
      "Target": "parseInt(${A}) > parseInt(${B})",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "A is larger than B!",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "B wins",
      "Value": "blue",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}

Similar String to Integer conversion posts: