User:Alexander.Gesinn/WD 2021-03-22
Initial Situation
A table defined by
{{#ask:[[IsA::Event]]
|?Acronym
|mainlabel=Event
| ?End_date = end_date
| ?Start_date = start_date
| limit=20
|format=table
}}
Task 1: Increase the limit
Increase the limit to the maximum value that is possible according to the current configuration of OpenResearch.
The above query is using the parameter limit
to restrict the maximum number of results that are returned. By removing limit
, the number of results is limited by configuration parameter $smwgQMaxInlineLimit
(default: 500). The number of results returned before the "...further results" link is shown can be configured by $smwgQDefaultLimit
(default: 50).
- Solution
{{#ask:[[IsA::Event]]
|?Acronym
|?End_date=end_date
|?Start_date=start_date
|format=table
}}
Acronym | end_date | start_date | |
---|---|---|---|
3DUI 2010 | 3DUI 2010 | 21 March 2010 | 20 March 2010 |
3DUI 2016 | 3DUI 2016 | 20 March 2016 | 19 March 2016 |
3DUI 2020 | 3DUI 2020 | 26 March 2020 | 22 March 2020 |
3IA 2009 | 3IA 2009 | 30 May 2009 | 29 May 2009 |
3PGIC 2010 | 3PGIC 2010 | 18 February 2010 | 15 February 2010 |
4S4D 2017 | 4S4D 2017 | 18 May 2017 | 17 May 2017 |
5GU 2017 | 5GU 2017 | 9 June 2017 | 8 June 2017 |
5GWN 2017 | 5GWN 2017 | 23 April 2017 | 21 April 2017 |
AAAI 1980 | AAAI 1980 | 21 August 1980 | 18 August 1980 |
AAAI 1982 | AAAI 1982 | 20 August 1982 | 18 August 1982 |
AAAI 1983 | AAAI 1983 | 26 August 1983 | 22 August 1983 |
AAAI 1984 | AAAI 1984 | 10 August 1984 | 6 August 1984 |
AAAI 1986 | AAAI 1986 | 15 August 1986 | 11 August 1986 |
AAAI 1987 | AAAI 1987 | 17 July 1987 | 13 July 1987 |
AAAI 1988 | AAAI 1988 | 26 August 1988 | 21 August 1988 |
AAAI 1990 | AAAI 1990 | 3 August 1990 | 29 July 1990 |
AAAI 1991 | AAAI 1991 | 19 July 1991 | 14 July 1991 |
AAAI 1992 | AAAI 1992 | 16 July 1992 | 12 July 1992 |
AAAI 1993 | AAAI 1993 | 15 July 1993 | 11 July 1993 |
AAAI 1994 | AAAI 1994 | 4 August 1994 | 31 July 1994 |
AAAI 1996 | AAAI 1996 | 8 August 1996 | 4 August 1996 |
AAAI 1997 | AAAI 1997 | 31 July 1997 | 27 July 1997 |
AAAI 1998 | AAAI 1998 | 30 July 1998 | 26 July 1998 |
AAAI 1999 | AAAI 1999 | 22 July 1999 | 18 July 1999 |
AAAI 2000 | AAAI 2000 | 1 August 2000 | 30 July 2000 |
AAAI 2002 | AAAI 2002 | 1 August 2002 | 28 July 2002 |
AAAI 2004 | AAAI 2004 | 29 July 2004 | 25 July 2004 |
AAAI 2005 | AAAI 2005 | 13 July 2005 | 9 July 2005 |
AAAI 2006 | AAAI 2006 | 20 July 2006 | 16 July 2006 |
AAAI 2007 | AAAI 2007 | 26 July 2007 | 22 July 2007 |
AAAI 2008 | AAAI 2008 | 17 July 2008 | 13 July 2008 |
AAAI 2010 | AAAI 2010 | 15 July 2010 | 11 July 2010 |
AAAI 2011 | AAAI 2011 | 11 August 2011 | 7 August 2011 |
AAAI 2012 | AAAI 2012 | 26 July 2012 | 22 July 2012 |
AAAI 2013 | AAAI 2013 | 18 July 2013 | 14 July 2013 |
AAAI 2014 | AAAI 2014 | 31 July 2014 | 27 July 2014 |
AAAI 2015 | AAAI 2015 | 30 January 2015 | 25 January 2015 |
AAAI 2016 | AAAI 2016 | 17 February 2016 | 12 February 2016 |
AAAI 2017 | AAAI 2017 | 9 February 2017 | 4 February 2017 |
AAAI 2018 | AAAI 2018 | 7 February 2018 | 2 February 2018 |
AAAI 2019 | AAAI 2019 | 1 February 2019 | 27 January 2019 |
AAAI 2020 | AAAI 2020 | 12 February 2020 | 7 February 2020 |
AAAI 2021 | AAAI 2021 | 9 February 2021 | 2 February 2021 |
AAAI 2022 | AAAI 2022 | 1 March 2022 | 22 February 2022 |
AAAI HBM 2009 | AAAI HBM 2009 | ||
AAAI Spring Symposium 2010 | AAAI Spring Symposium 2010 | 24 March 2010 | 22 March 2010 |
AAC 2019 | AAC 2019 | 27 November 2019 | 25 November 2019 |
AAC 2021 | AAC 2021 | 24 November 2021 | 22 November 2021 |
AACIMP 2011 | AACIMP 2011 | 20 August 2011 | 8 August 2011 |
AACL 2008 | AACL 2008 | 15 March 2008 | 13 March 2008 |
... further results |
Task 2: Modify query to use datatables
The datatables format is used to enable the data in the table to be searched.
{{#ask:[[IsA::Event]]
|?Acronym
|?End_date=end_date
|?Start_date=start_date
|mainlabel=Event
|format=datatables
}}
Task 3: Add additional field/column
Add an additional frequently used field/column to be selected from the properties listed on the PropertyUsageSorted page, e.g., Ordinal.
{{#ask:[[IsA::Event]]
|?Acronym
|?End_date=end_date
|?Start_date=start_date
|?Ordinal
|mainlabel=Event
|format=datatable
}}
Task 4: UrlGetParameter
- The UrlGetParameter extension is used so that a query parameter can be attached to the page URL, e.g., the ordinal value "1" is specified as an URL query parameter, such that the wiki pages shows a table only with entries for conferences that were the first in their series.
- Issue #16 is avoided.
- Solution
- Note 1: Parameters passed via URL should be encoded using only the limited US-ASCII characters legal within a URI. This is done automatically by Extension:UrlGetParameters, e.g.
test=A:B
will be returned astest=A%3AB
by#urlget
. Thus decoding might be required before using parameters. - Note 2: If a parameter is optional, code that relies on that parameter, needs to deal with absence of the parameter without causing issues.
- Note 3: If a parameter is expected to be a specific data type / format, code that relies on that data type / format, needs to implement checks ("never trust a stranger unless he gives you candy"). https://www.mediawiki.org/wiki/Extension:RegexFunctions can help with that.
- Note 4: If a parameter is expected to allow multiple values, further processing needs to be done to transform the values to an ask query compliant format (e.g. using Page Forms
#arraymap
parser function or functionality provided by https://www.mediawiki.org/wiki/Extension:Arrays or https://www.mediawiki.org/wiki/Extension:Variables.
Showing results for Ordinal={{#urlget:ordinal}}
:
"{{#urlget:ordinal}}" is not a number.