User:Alexander.Gesinn/WD 2021-03-22

From Openresearch
< User:Alexander.Gesinn
Jump to: navigation, search

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
}}
 Acronymend_datestart_date
" DBKDA 2021"" DBKDA 2021"3 June 202130 May 2021
"ENERGY 2021""ENERGY 2021"3 June 202130 May 2021
"ICAS 2021""ICAS 2021"3 June 202130 May 2021
"ICNS 2021""ICNS 2021"3 June 202130 May 2021
2021 ICIMP2021 ICIMP12 June 202110 June 2021
2022 DMIP 20222022 DMIP 202213 November 202210 November 2022
2022 ICRCA2022 ICRCA28 February 202226 February 2022
3DUI 20163DUI 201620 March 201619 March 2016
3DUI 20203DUI 202026 March 202022 March 2020
3IA 20093IA 200930 May 200929 May 2009
3PGIC 20103PGIC 201018 February 201015 February 2010
3dui 20103DUI 202021 March 201020 March 2010
4S4D 20174S4D 201718 May 201717 May 2017
5GU 20175GU 20179 June 20178 June 2017
5GWN 20175GWN 201723 April 201721 April 2017
AAAI 1980AAAI 198021 August 198018 August 1980
AAAI 1982AAAI 198220 August 198218 August 1982
AAAI 1983AAAI 198326 August 198322 August 1983
AAAI 1984AAAI 198410 August 19846 August 1984
AAAI 1986AAAI 198615 August 198611 August 1986
AAAI 1987AAAI 198717 July 198713 July 1987
AAAI 1988AAAI 198826 August 198821 August 1988
AAAI 1990AAAI 19903 August 199029 July 1990
AAAI 1991AAAI 199119 July 199114 July 1991
AAAI 1992AAAI 199216 July 199212 July 1992
AAAI 1993AAAI 199315 July 199311 July 1993
AAAI 1994AAAI 19944 August 198431 July 1994
AAAI 1996AAAI 19968 August 19964 August 1996
AAAI 1997AAAI 199731 July 199727 July 1997
AAAI 1998AAAI 199830 July 199826 July 1998
AAAI 1999AAAI 199922 July 199918 July 1999
AAAI 2000AAAI 20001 August 200030 July 2000
AAAI 2002AAAI 20021 August 200228 July 2002
AAAI 2004AAAI 200429 July 200425 July 2004
AAAI 2005AAAI 200513 July 20059 July 2005
AAAI 2006AAAI 200620 July 200616 July 2006
AAAI 2007AAAI 200726 July 200722 July 2007
AAAI 2008AAAI 200817 July 200813 July 2008
AAAI 2010AAAI 201015 July 201011 July 2010
AAAI 2011AAAI 201111 August 20117 August 2011
AAAI 2012AAAI 201226 July 201222 July 2012
AAAI 2013AAAI 201318 July 201314 July 2013
AAAI 2014AAAI 201431 July 201427 July 2014
AAAI 2015AAAI 201530 January 201525 January 2015
AAAI 2016AAAI 201617 February 201612 February 2016
AAAI 2017AAAI 20179 February 20174 February 2017
AAAI 2018AAAI 20187 February 20182 February 2018
AAAI 2019AAAI 20191 February 201927 January 2019
AAAI 2020AAAI 202012 February 20207 February 2020
AAAI 2021AAAI 20219 February 20212 February 2021
... 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
}}

Loading...

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
}}

Loading...

Task 4: UrlGetParameter

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 as test=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.

No Ordinal given, showing all results:

Loading...