How to add a column to a OneClick table, that display a model attribute, but if that attribute is empty or it doesn't exist, then display a different one.
The idea is to list in a table different models whose attribute ID that contains the value that needs to be displayed is not always the same.
Release : 21.2
The product documentation includes an example on how this could be implemented.
On the next example, the column "HA-State" will display the attribute 0xfff03605, but if that attribute is empty or null (doesn't exist for the model), then 0x6520013 will be displayed instead.
<column id="column-HaState-config.xml"
xmlns ="http://www.aprisma.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.aprisma.com
../../common/schema/column-config.xsd">
<name>HA-State</name>
<content>
<attribute>0xfff03605</attribute>
<expression>
(value() == null || ((String)value()).length() == 0) ?
attr( 0x6520013 ) : value()
</expression
</column>