Help:Property constraints portal/One of

From Wikidata
Jump to navigation Jump to search
Translate this page;
Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية

This page contains changes. Please contact a translation admin to mark them for translation.


Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية
Pictogram voting list.svg

one-of constraint (Q21510859) specifies that only certain values are allowed for a property. Its opposite is none of constraint (Q52558054).

For example, the only valid values for driving side (P1622) are left (Q13196750) and right (Q14565199).

If no constraint scope (P4680) is specified, this constraint is checked everywhere.

Possible actions[edit]

There are several possible ways to address a violation of this constraint:

  • It is possible that the value is erroneous, and one of the allowed values should be used instead, e. g. left (Q13196750) (direction) instead of left-wing (Q164597) (political term, has the same label in some languages).
  • It is possible that the statement is incorrect and should be removed.
  • It is possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Parameters[edit]

This constraint has one mandatory parameter:

item of property constraint (P2305)
Contains the allowed values. no value Help and unknown value Help are interpreted literally, like any normal value (statements with no value Help or unknown value Help are only allowed if these special values are also given in the allowed values).

Examples[edit]

Example 1[edit]

Example setting for driving side (P1622).

property constraint
Normal rank one-of constraint Arbcom ru editing.svg edit
item of property constraint left
right
constraint status mandatory constraint
▼ 0 reference
+ add reference
+ add value

Example 2[edit]

Example setting for wheelchair accessibility (P2846).

property constraint
Normal rank one-of constraint Arbcom ru editing.svg edit
item of property constraint wheelchair accessible
wheelchair accessible with help
wheelchair inaccessible
▼ 0 reference
+ add reference
+ add value

Template[edit]

When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.

One of left (Q13196750), right (Q14565199): value must be one of the specified items. Please expand list if needed. (Help)
List of this constraint violations: Database reports/Constraint violations/P1622#One of, values statistics, hourly updated report, SPARQL, SPARQL (new)

Lists[edit]

Lists of properties which are set one-of constraint.