Mark_VG
(Mark)
September 18, 2023, 11:20am
1
Hi All
I have searched and tested many options but can not find a working solution.
How can I use a :
in a Label for a widget?
- component: Label
config:
style:
font-size: 12px
white-space: nowrap
position: absolute
left: 83px
text: ="COMM : " + items.item.state
Produces an error. Replacing ``:``` with anything else works.
Thanks
Mark
hmerk
(Hans-Jörg Merk)
September 18, 2023, 11:28am
2
What about
text: ='"COMM : " + items.item.state'
Mark_VG
(Mark)
September 18, 2023, 11:43am
3
No luck:
Nested mappings are not allowed in compact mappings at line 612, column 27:
text: ='"COMM : " + items.item.state'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
Keeef
(Keith I)
September 18, 2023, 11:48am
4
text: '= "Out: "+ @props.itemOut'
Works for me.
ubeaut
(Greg)
September 18, 2023, 11:48am
5
I have this in one of my cells.
title: '="Gate closed: " + Number.parseInt(items.gatecounter.state) + " times"'
The ’ are on the left of the equals sign
hmerk
(Hans-Jörg Merk)
September 18, 2023, 11:49am
6
Correct, that was my mistake, sorry!!!
Mark_VG
(Mark)
September 18, 2023, 12:08pm
7
Thank you. Works perfectly… Thought I had tried that.