0

Change field colour based on multiple if then else

Dear All,

Any idea why the following code results in the error:

 

if 'Current Inventory' > 'Total Count' then
styled("Inventory is SMALLER", "#ddeeff", "green", "dialog");
else
if 'Current Inventory' < 'Total Count' then
"Inventory is LARGER"
else
if 'Current Inventory' = 'Total Count' then
"Inventory is CORRECT"
end
end
end

Error message + copy of code has been attached.

 

Thanks,

BasError messageCopy of code

1 reply

null
    • Nick
    • 4 yrs ago
    • Reported - view

    Hi,

    try this:

     

    if 'Current Inventory' > 'Total Count' then
    styled("Inventory is SMALLER", "#ddeeff", "green", "dialog")
    else
    if 'Current Inventory' < 'Total Count' then
    styled("Inventory is LARGER", "", "", "")
    else
    if 'Current Inventory' = 'Total Count' then
    styled("Inventory is CORRECT", "", "", "")
    end
    end
    end

Content aside

  • 4 yrs agoLast active
  • 1Replies
  • 913Views