Querying for non-empty values

From semantic-mediawiki.org

Hello,

I'm trying to query those pages to count where a particular property is not empty. I've used as follows:

{{#ask:[[Competitor::! ]] |?Competitor |format=count }}

A number does result indicating how many pages have "Competitor" not null, but an error results as well: "Empty strings are not accepted".

Let me ask, is this the right way to query for non-empty properties? If this is the only possible way to do, is there a way to suppress the error?

23:14, 3 December 2013

Have you tried {{#ask:[[Competitor::+]]|format=count}}?

03:43, 4 December 2013

Thanks, that works great! And how about those situations where the field IS empty?

I tried [[Competitor::-]], but did not work.

20:47, 12 December 2013

This is not covered by SMW. You can only query for existing property values. Probably you may do a {{#if: {{{Competitor}}} | | {{#set:Competitor provided=No}} }} with the property "Competitor provided" is of data type "boolean" and then query for pages with the "No" boolean.

21:42, 12 December 2013

Thanks for that!

21:15, 20 December 2013