Forum Discussion

Re: Formula RTF - Syntax Error

Maybe it's a copy-paste issue but in the code you shared there is a missing semicolon on the very last line.  It should be:

var text Discharged= If( [Status] = "Discharged", "<div style=\"" & $style & " background: #F95A5A; border-radius: 0px 12.5px 12.5px 0px; \"><p>Discharged</p></div>", "<div style=\"" & $style & " background: #C1C3C4; border-radius: \"><p>Discharged</p></div>");​

------------------------------
Nathan Hawe
------------------------------

3 Replies

  • TimEgerton's avatar
    TimEgerton
    Qrew Trainee
    Hi Nathan,

    Thanks for the reply. I thought that too but I get this syntax error when I add the semi colon.



    ------------------------------
    Tim Egerton
    ------------------------------
    • BlakeHarrison's avatar
      BlakeHarrison
      Qrew Captain
      I don't know that it would cause this error, but I did notice you've got missing CSS in the ELSE statement on that one.

      var text Discharged= If( [Status] = "Discharged", "<div style=\"" & $style & " background: #F95A5A; border-radius: 0px 12.5px 12.5px 0px; \"><p>Discharged</p></div>", "<div style=\"" & $style & " background: #C1C3C4; border-radius: \"><p>Discharged</p></div>");​

      ------------------------------
      Blake Harrison
      bharrison@datablender.io
      DataBlender - Quick Base Solution Provider
      Atlanta GA
      404.800.1702 / http://datablender.io/
      ------------------------------
    • AdamKeever1's avatar
      AdamKeever1
      Qrew Commander
      Try ending with ));

      ------------------------------
      Adam Keever
      ------------------------------