Help:Type Record


 * Note: this documentation from the Semantic Mediawiki site is included here for ease of reference. The examples given are for use on their site except where we have internalized them.  For examples that work on Familypedia, see .  - ~  Ph l o x  

A many-valued property maps between a subject and two or more values. This is distinct from the most common type of property, a binary property which maps between a single subject and a single value. A many-valued property cannot be split up into separate properties, because the set of values that it groups are all interconnected in some way.

Implementation in SMW
In Semantic MediaWiki, you can specify that a property takes multiple values by listing more than one type in its Property:Has type, separated by ; (semicolons).

For example, on semanticweb.org, Property:Employment includes an employer, job title, start date and end date; it is specified as  has type::Page; String; Date; Date . In articles you can add this property, specifying any subset of those four values, again separated by ; (semicolons). You can use  ""  (two double quotation marks) or ? for omitted values.

The first value appears normally, while the remaining ones appear within parentheses, separated by commas.

Semantic search
You can search on many-valued properties similarly to other properties; see Help:Semantic search. As with any property, you can use the + wildcard to select all pages with some value for a many-valued property, for example   To find pages that match a particular value for any of the parts of a many-valued property, just list the values to match, separated by semicolons. If you don't care about the value of one of the datatypes, use ? to match any value for it including omitted. You can also use comparators (such as ! for not, < for less than or equal to, etc.) for each of the datatype's values.

For example, selects values for the property Employment with any value for the employer string, where the title string is not "professorship", the start date is before 1951, and with any value for end date.

Limitations

 * You cannot use the special Allows value property to limit the values of any element of a many-valued property.
 * You cannot use the special Display units property to control how a specific element appears.
 * You cannot set the layout of the values; they will always appear as a comma-separated list.
 * You cannot create a timeline query of many-valued properties.