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
    • 5 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

  • 5 yrs agoLast active
  • 1Replies
  • 914Views