The same information via 'ask' or 'show'

From semantic-mediawiki.org

Thank you very much! That is what I was looking for. But now, when I've found it, I've discovered two more questions:

1) #ask generates list with comma as delimiter (separator), so if there is comma in resulting values the list become messed up. How to change delimiter in #ask so #arraydefine will split the list correctly? Inline queries, Selecting pages and Result formats give no clue.

2) How to handle "see more" link in long list to leave this link the last, when sorting, but not to sort with the query result putting somewhere in the middle?

10:53, 18 April 2018

In a lot of cases issues appear along the way when constructing queries.

1) Looking for a solution via result formats was right. The particular format used is "list", so you can use it's "sep" parameter to define another separator between results and let "arraydefine" work with it:

{{#arraydefine: values
 |{{#ask:
  [[Has installation type::+]]
  |?Has installation type
  |mainlabel=-
  |headers=hide
  |format=list
  |sep=;
 }}
 |;
 |unique, sort=desc
}}

2) Probably you do not want to have the "see more" link at all, since this is not a reusable value. Add the "searchlabel" parameter and hide the standard output. Also increase the result limit to a value higher than the number of expected results to make sure that you do not cut off valid values.

{{#arraydefine: values
 |{{#ask:
  [[Has installation type::+]]
  |?Has installation type
  |mainlabel=-
  |headers=hide
  |format=list
  |sep=;
  |searchlabel=
  |limit=500
 }}
 |;
 |unique, sort=desc
}}

Note configuration parameter $smwgQMaxInlineLimitSets the maximal number of rows ever printed by queries in connection with the limit parameter.

21:39, 19 April 2018

Thank you very much! Both answers are 100% useful.

10:49, 15 June 2018