TableData

From Referata scratchpad
Jump to: navigation, search

Would like to highlight cells in a semantic search based on the value of a second property. My wiki is a few versions behind (SMW 1.5.1), so there may be a new feature I need to try. Internal records are on this page.

SOLUTION Using a wikitable Template properly[edit]

Intro, Outro, etc. See: CreateTabularOutput!

The header=show attribute seems to be disabled (header properties no longer links).

Using a Template (Template:TableCel2)[edit]

TableVal ValQuality DataRecord

100.1

High TableData

200.2

Moderate TableData

300.3

Low TableData

400.4

Unknown TableData


PROBLEM[edit]

Using a Broad table[edit]

Default features are great: resort, link to headers, auto column size, ...

TableVal ValQuality DataRecord
100.1 High TableData
200.2 Moderate TableData
300.3 Low TableData
400.4 Unknown TableData

Using a Template (Template.TableCel)[edit]

Set background, but lost all the default behaviors, and ability to add columns without changing template...

100.1
200.2
300.3
400.4


Using a template via the display line would be cool[edit]

Access a specific template via a data display line. Maybe could be used for computations, also. Something like for built in types, perhaps?

Alternatively, there may be a way to generate a wikitable from a template (e.g. Template:TableCel). Anyone have an example?

{{#ask:[[DataRecord::TableData]]
|?{{TableCelBG | TableVal | ValQuality }}
|?ValQuality
|?DataRecord
|format=broadtable
|link=all
|headers=show
|mainlabel=-
}}
Example: {{TableCelBG | 5.25 | High }}

Example Result: 5.25


Desired[edit]

TableHighlight.jpg

Result[edit]

DataRecord
TableData
TableData
TableData
TableData

Result[edit]

DataRecord
TableData
TableData
TableData
TableData