Template:Constraint:Item
Jump to navigation
Jump to search
Item: items with this property should also have
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). List of violations of this constraint: [[Wikidata:Database reports/Constraint violations/Constraint:Item#Item {{{property}}}|Database reports/Constraint violations/Constraint:Item#Item {{{property}}}]]
This template is obsolete. Please use property constraint (P2302) with value item-requires-statement constraint instead. For further information, see Help:Property constraints portal. |
- Purpose
- Allows to check if items using a given property also use other properties.
- Sample
- Wikimedia language code (P424) is used on items about languages.
- These items all should have instance of (P31)language (Q34770).
- To check this and find items that still miss instance of (P31)language (Q34770),
add{{Constraint:Item|property=P31|item=Q34770}}
to Property talk:P424.
- Categorization
- This template categorizes into Category:Properties with constraints on items using them
Usage
[edit]{{Constraint:Item|property=Pxx|item=Qxx
|items={{Q|xx}},{{Q|xx}},{{Q|xx}} |exceptions={{Q|xx}},{{Q|xx}} }}
- xx are numbers
- Samples
- Items that should have property:P131:
{{Constraint:Item|property=P131}}
- Items that should have Property:P10 with value Q1:
{{Constraint:Item|property=P10|item=Q1}}
- To check for persons or taxons, add:
{{Constraint:Person}}
or{{Constraint:Taxon}}
accordingly- which expands to multiple
{{Constraint:Item}}
statements
- To check for items in a specific country, add all of the following:
{{Constraint:Item|property=P17|item=Q34}}
{{Constraint:Item|property=P131}}
- Sample is for Sweden (Q34)
See also
[edit]The above documentation is transcluded from Template:Constraint:Item/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |