Author: trueskew
Description:
I've got pages that each have multiple SIO records, and each record includes a date (Status Report Date of type Date). I was able to create a 2 column summary table that lists each page along with the date of the newest record with this query:
<pre>
{{#ask:[[Category:Status Report]] [[Has Contributor::{{PAGENAME}}]]
?Has Effort=Effort | ||
link=none | ||
sort=Has Effort | ||
format=template | ||
template=display2ColTableViewStatusReportEntry | ||
intro={{display2ColSortTableHeader | col1=Effort | col2=Last Update}} |
outro={{displayTableFooter}} | ||
}}
</pre>
where Template:display2ColTableViewStatusReportEntry holds
<pre>
[[{{{1}}}#{{#ask: [[Status Report Record::{{{1}}}]] | ?Has Status Report Date= | sort=Has Status Report Date | format=list | limit=1 | order=descending | mainlabel=- | link=none | headers=hide | searchlabel= }} | {{{2}}} - View]] |
{{#ask: [[Status Report Record::{{{1}}}]] | ?Has Status Report Date= | sort=Has Status Report Date | format=list | limit=1 | order=descending | mainlabel=- | link=none | headers=hide | searchlabel= }} | |
- | ||||||||||
</pre>
This results in a column sort table like
<pre>
Effort v Last Update
Soda Project - View 4 November 2010
Burger Project - View 25 October 2010
Hot Dog Project - View 20 May 2010
Sandwich Project - View 19 October 2010
</pre>
The table shown above replicates one sorted by Last Update in descending order. It sorts alphanumerically rather than by date.
Version: unspecified
Severity: normal