accateo
(accat)
May 5, 2021, 8:57am
1
Hi,
I'm trying to color text that is result from a query:
filters
| essql
query="SELECT date + interval '2' hour as dateNew, DATEDIFF('minute',date, CURRENT_TIMESTAMP()) as diff FROM device_data_eggy ORDER BY date DESC LIMIT 1"
| mapColumn name="formatted_date" expression={getCell "dateNew" | formatdate format="DD/MM/YY HH:mm"}
| var_set "color" value={if condition={getCell column="diff" | lt 30} then="green" else="red"}
| markdown "{{#each rows}} {{formatted_date}} {{/each}}"
| render css=".canvasRenderEl p{
font-family: 'Quicksand';
color: \"" {var "color"} "\" ;
}"
but I have this error:
[render] > Unknown argument '_' passed to function 'render'
Why?
Thanks
accateo
(accat)
May 6, 2021, 11:05am
3
filters
| essql
query="SELECT date + interval '2' hour as dateNew, DATEDIFF('minute',date, CURRENT_TIMESTAMP()) as diff FROM device_data_eggy ORDER BY date DESC LIMIT 1"
| var_set name="color" value={if condition={getCell column="diff" | lt 30} then="green" else="red"}
| mapColumn name="formatted_date" expression={getCell "dateNew" | formatdate format="DD/MM/YY HH:mm"}
| markdown "{{#each rows}} {{formatted_date}} {{/each}}"
| render
css={string ".canvasRenderEl p{
font-family: 'Quicksand';
color: " {var name="color"} ";
}"}
The error was the presence of \
1 Like
system
(system)
Closed
June 3, 2021, 11:05am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.