Help:Datatype "Boolean"

From semantic-mediawiki.org
Help:Datatype "Boolean"Type:Boolean #LOCL formatter
Boolean
Holds boolean (true/false) values
Further Information
Provided by: Semantic MediaWiki
Added in version: 1.0
Removed in version: still in use
Datatype ID:
_boo
In this wiki: Boolean
Table of Contents

The datatype Boolean is for attributes that can only have two possible values, called truth value. You can enter "true" or "false", also 1/0, yes/no, t/f, and y/n. Other languages may provide language-specific options.

To allow two arbitrary strings, or more than two possible values (such as no - maybe - probably - yes) use Help:Datatype "String" with Property:Allows value to restrict the possible values. In many circumstances it may also be more appropriate to use a category instead of a Boolean.

Display formatting

By default, Boolean values will display true and false in queries. This can be changed by specifying a format string to control what is displayed for the true and false values of a property.

{{#ask:
 [[Category:Project]]
 |?Has boolean#<FORMATTER>
}}


Examples

References

  1. ^ sandbox:smw:1580 
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:1580