This page shows an example on how to query for data stored in a subobject and to display the results in a table.
Note:
- This example uses an anonymous identifier for the subobject. Otherwise all data would end up in the same cell in the first row of the table.
- You will still have to assign appropriate data type to the properties used.
{{#ask:
[[-Has subobject::{{PAGENAME}}]]
| mainlabel=-
| ?Assignment
| ?Assignee
| ?AddedDate = Added
| ?Status
| ?DueDate = Due
| index=0
| link=all
| format=broadtable
| headers=plain
| class=sortable wikitable smwtable
| default=no project / task found
}}
| Assignment | Assignee | Added | Status | Due |
|---|---|---|---|---|
| Task 03 | MS | 12 March 2015 | Overdue | 14 December 2015 |
| Task 02 | MZ | 10 March 2015 | As planned | 31 March 2018 |
| Task 01 | MZ | 10 March 2015 | Open | 31 March 2016 |
| Task 03 | MS | 10 March 2015 | Overdue | 26 November 2015 |
The subobject corresponding to the first line in the results table above:
{{#subobject:
|Assignment=Task 01
|Assignee=MZ
|AddedDate=2015/03/10
|Status=open
|DueDate=2016/03/31
|Notes=Task 02
|Project=IT-Project/ZI TEST 01
}}