This wiki is being moved to a new server and cannot be edited. Please sit tight. Thank you.

Help:Examples for boolean values pairs

From semantic-mediawiki.org
Table of Contents

These examples show setting the property Property:Has boolean with different valid and non valid values according to datatype "Boolean"Holds boolean (true/false) values

valid value pairs[edit]

1 ↔ 0
true ↔ false
t ↔ f
yes ↔ no
y ↔ n

invalid values pairs[edit]

  • x"x" is not recognized as a Boolean (true/false) value. ↔ -"-" is not recognized as a Boolean (true/false) value.

If you would like to make these valid options add the values to the system messages "MediaWiki:Smw true words" or "MediaWiki:Smw false words" respectively.

Queries[edit]

show[edit]

{{#show: {{FULLPAGENAME}} |?Has boolean }}

true, false

show with display formatters[edit]

{{#show: {{FULLPAGENAME}} |?Has boolean#x,- }}

x, -

show with display formatters using UTF-8 characters[edit]

{{#show: {{FULLPAGENAME}} |?Has boolean#✅,☐ }}

✅, ☐

ask[edit]

{{#ask:
 [[{{FULLPAGENAME}}]]
 |?Has boolean
 |format=table
 |mainlabel=-
}}
Has boolean
true
false