When the item value is a date it displays correctly (although I don’t fully understand why the tag shows the formatted date but not the rest of the text?).
When the value is UNDEF, I get that as the vallue in the label
How (and where) do I put in a formatting rule to catch the UNDEF and display blank (or anything else) instead?
is the item tag the corect place to format the date, or should that be done in the page label as well?
I’m competent with scripting etc., it’s the mechanics of what I need to put where, to control this formatting.
You can put in a transformation or an expression in the State Description Metadata of the Item. Or you can set the Label field with an expression on the Card configuration.
You can put in a transformation or an expression in the State Description Metadata of the Item. Or you can set the Label field with an expression on the Card configuration.
Thanks, but what is the transformation / expresison syntax?
I can’t find anything in the documentation which referrs to the syntax of this? Is there a compresensive summary anywhere of all the functions and syntax?
It’s not banned but it’s basically useless. It can’t be read without opening the image. It can’t be read on a phone at all. It can’t be found in a search. If it’s text, post the text in code fences and everyone will be happy.
Where can I find the function syntax? I can’t find anything in the documentation which refers to this.
Is there a comprehensive summary anywhere of all the functions and syntax, as all I’m finding is lists of the Java formatting strings (%…) and occasional mention of being able to put inline functions (e.g. for IF statements etc.) but no workable examples for explanation.
My background is in commercial applications development so I understand how these things work, I just need the summary documentation on how to get going with it.
For transformations (which you would use in the State Description metadata) see Transformations | openHAB and pay attention to and follow the link to Item and Sitemap labels.
Beyond that no docs exist. The UI stuff is based on the F7 framework so a lot of stuff can be found documented there.