I have a tab delimited text file with a column "Status". It can have values OFF-AIR or ON-AIR. How do I control the marker properties like colour or out-line using the expression building. I am not looking for categorized symbol, I need the expression. This is my syntax, but it is not working:

CASE WHEN  "STATUS"  = 'ON AIR' THEN  color_rgba(255,255,0,80)
  WHEN  "STATUS"  = 'OFF AIR' THEN  color_rgba(255,0,0,80)

enter image description here


Haven't come across this issue before but it seems to work if you use three single quotation marks for the values:

CASE WHEN "STATUS" = '''ON AIR''' THEN color_rgba(255,255,0,80) 
WHEN "STATUS" = '''OFF AIR''' THEN color_rgba(255,0,0,80) 


  • @Joseph: can you explain why you need 3 single quotation marks here? This is so different from the other expressions where values only needs 1. – PieterB Aug 11 '16 at 12:11
  • Hmm you shouldn't need need more then one ` because that is a string. – Nathan W Aug 11 '16 at 12:59
  • @Arindam - Most welcome, glad it worked :) – Joseph Aug 12 '16 at 8:36
  • 1
    @PieterB - You need 3 single quotation marks if the values in the csv file already contain single quotation marks which I guessed what the OP did. – Joseph Aug 12 '16 at 8:38
  • 1
    @Joseph, that make sense :-) – PieterB Aug 16 '16 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.