Forum Discussion
- ChrisChris9 years agoQrew Assistant Captain
I find that strange because this is the result I get with the status indicators when I hover.
_
- ChrisChris9 years agoQrew Assistant Captain
Here is a sample of the code I use above. Danimal has a point. Sorry for my error there:
"<div style='display:inline'>\n<span style='background-color:red'><img src='/i/clear2x2.gif' height=12 width=5 title='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed' alt='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed'></span>\n<span style='background-color:red'><img src='/i/clear2x2.gif' height=12 width=5 title='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed' alt='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed'></span>\n<span style='background-color:red'><img src='/i/clear2x2.gif' height=12 width=5 title='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed' alt='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed'></span>\n<span style='background-color:red'><img src='/i/clear2x2.gif' height=12 width=5 title='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed' alt='"&Round([% SLA Severity Duration Proximation]*100,0.01)&"% of severity duration has passed'></span>\n</div>",
- _anomDiebolt_9 years agoQrew EliteYou expect us to read that blob of text?
BTW, you have an extra space in this sting of text:
"of severity durat ion has passed"
On other matters when the text becomes that long you are better off doing this in script. Your markup can concisely be writtin in script using a new ES6 feature called string interpolation using backticks:
var markup = '
Hello ${variable}, how are you today?
';
See:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals - ChrisChris9 years agoQrew Assistant Captain
If you think that blob is impressive, you should gawk at the whole formula, dandy. I looked and I do not find that space in the "sting".
- _anomDiebolt_9 years agoQrew EliteI should note that QuickBase should offer string interpolation in their formula language so you would not have to concatenate strings "&". Like this:
"Hi ${[Name]} how are you today?"
On second thought why not just throw the formula language away and use JavaScript.
I already have a project underway that will parse QuickBase formulas using a JavaScript parser generator library called PEGjs:
https://pegjs.org/
It is working out very well. Soon we will have client side formulas evaluating in JavaScript and a way to convert existing QuickBase formulas to JavaScript. - _anomDiebolt_9 years agoQrew Elite>I looked and I do not find that space in the "sting".
It is there when you cut an paste it. It may be introduced through the forum.