Comparing 2 columns and see which one is greater in an if statement

So what you used is this?

if | ${!COL1} > ${!COL2}

or more explicit:

if | parseInt ("${!COL1}") < parseInt ("${!COL2}")

Both should work. In the 2nd version I use parseInt to make sure the string is converted to an integer. If you have decimal numbers, then use parseFloat instead:

if | parseFloat ("${!COL1}") < parseFloat ("${!COL2}")

And if it does not work: Do you get any error message?

Comparison test macro:

{
  "CreationDate": "2018-10-9",
  "Commands": [
    {
      "Command": "store",
      "Target": "8",
      "Value": "A"
    },
    {
      "Command": "store",
      "Target": "22",
      "Value": "B"
    },
    {
      "Command": "if",
      "Target": "${A} < ${B}",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "works, A=${A}, B=${B}",
      "Value": ""
    },
    {
      "Command": "endif",
      "Target": "",
      "Value": ""
    }
  ]
}