Extremely basic question about properties with multiple values

From semantic-mediawiki.org

Just exclude red:

{{#ask: [[Has colors::!red]] }}

This query will list all pages holding the "Has colors" property but without red as the annotated value. See also this example.

11:00, 7 August 2018

Ok, so it turns out that things are not so easy as they appear. Currently it depends on the data backend used which results you will be getting. The example page used uses the supplementary "SMWElasticStore" backend which will be available with SMW 3.0. Here you are getting the result as shown, whereas if you are using the "SMWSQLStore3" backend it indeed turns out that it is not possible this way. So you have to apply some tricks, e.g. adding a (hidden) category called e.g. "Has colors red" or better model a different data structure with using sub-properties like "Has colors red" both allowing for direct selection for querying. I must note that you do not necessarily have do set up this extra property as a sub-property.

16:16, 7 August 2018