Ask
Explanation of Semantic MediaWiki ask function
see also Test-Ask for invers properties, e.g. [[-Has mother::Michael]]
help page
http://semantic-mediawiki.org/wiki/Help:Selecting_pages, including " ::>, ::! "
output to vcard
Warning: exports all users on this wiki ... further results
for errors, see Josef_Noll
Example
{{#ask:[[Category:User]]
|?=search for users#
|?User
|?Date
|?Title
|format=broadtable
|limit=5
|offset=1
|link=all
|sort=User count
|order=descending
|headers=plain
|mainlabel=search for users
|intro=results
|outro=done
|searchlabel=… further results
|default=no results found
|class=sortable wikitable smwtable
}}
Ask with OR connection
{{#ask: [[Supervisor::{{SUBJECTPAGENAME}}]] OR [[Lecturer::{{SUBJECTPAGENAME}}]] OR
[[User::{{SUBJECTPAGENAME}}]] OR [[{{SUBJECTPAGENAME}}]]
Ask for part of a string, e.g. all routers of type RDB52G - see example: RDB52G
ask# [[Model::~*RDB52G*]]
ommit main label: | mainlabel=- |
More info on formatting the output, see https://www.semantic-mediawiki.org/wiki/Help:Result_formats
Tips and Tricks, using Set
Recommendation from Neill: I always hide the raw page name as much as possible and use aliases so queries return more user friendly links.
{{#set:Page Link=[[{{FULLPAGENAME}}|{{{Page Title|}}}]]}} where Page Title is usually a field in the form. Sometimes I prepend with a section ID {{#set:Page Link=[[{{FULLPAGENAME}}|{{{Section ID|}}}-{{{Page Title|}}}]]}}
Then in the queries I return Page Link and use mainlabel=- to suppress the raw page name field.
{{#ask: |?Page Link .. .. |mainlabel=- }}
Note:
- <section id="main"> <!-- main page content goes in here --> </section>
- define Page Link as a Special:Property
Set syntax
set allows for properties linked to a page, e.g. Paris. Though can't be used for changing a property on a page, only adding more properties..., e.g. has postcode=7501|has postcode=7502|has postcode=7503. Note: not found out how to query one of them
{{#set:
Has population=2,229,621
|Located in country=France
}}
email list
Example is taking for project IoTSec, here only science people
Adam Szekeres <adam.szekeres@ntnu.no>, Bernt A. Bremdal <bernt@xalience.com>, Christian Johansen <cristi@ifi.uio.no>, Christian Resell <chrifres@ifi.uio.no>, Danica Radovanovic <danica@basicinternet.org>, Dieter Hirdes <dieter.hirdes@ncesmart.com>, Einar Snekkenes <einar.snekkenes@ntnu.no>, Elahe Fazeldehkordi <elahe.fazeldehkordi@its.uio.no>, Getinet Ayele Eshete <getina15@student.uia.no>, György Kálmán <gyorgy.kalman@its.uio.no>, Habtamu Abie <habtamu.abie@nr.no>, Hamed Arshad <hamedar@ifi.uio.no>, Hanne Cecilie Geirbo <hannege@ifi.uio.no>, Hans Jørgen Furre Nygårdshaug <hans.nyg@gmail.com>, Heidi Tuiskula <heidi.tuiskula@smartinnovationnorway.com>, Håkon Duus <hakondu@ncesmart.com>, Ivar Rummelhoff <Ivar.Rummelhoff@nr.no>, Jayaprakash Rajasekharan <jayaprakash.rajasekharan@ncesmart.com>, Johanna Johansen <johanna@johansenresearch.info>, Josef Noll <josef.noll@its.uio.no>, Kaniz Fatema Tuly <kftuly@yahoo.com>, Kim Jonatan Wessel Bjørneset <kjbjorne@ifi.uio.no>, Konstantin Lenchik <konstantin.lenchik@gmail.com>, Kristin Vinje <>, Linn Eirin Paulsen <rocklinn@gmail.com>, Maghsoud Morshedi <morshedi.m@gmail.com>, Mark Stegelmann <mark.stegelmann@ccis.no>, Maunya Doroudi Moghadam <maunyad@its.uio.no>, Ming-Chang (Leo) Lee <mingchang1109@gmail.com>, Naji Ahmed Kadah <naji87@gmail.com>, Nils Kalstad Svendsen <nils.svendsen@ntnu.no>, Olaf Owe <olaf@ifi.uio.no>, Ole Gabrielsen <ole.gabrielsen@ncesmart.com>, Paal Engelstad <paal.engelstad@ffi.no>, Pallavi Kaliyar <>, Peder Aursand <Peder.Aursand@nr.no>, Rabie Belahcen <rabiebelahcen@gmail.com>, Rune Winther <rune.winther@multiconsult.no>, Seraj Fayyad <serajf@ifi.uio.no>, Shukun Tokas <shukunt@ifi.uio.no>, Sigurd Eskeland <Sigurd.Eskeland@nr.no>, Sofie Nystrøm <sofie.nystrom@ccis.no>, Sokratis Katsikas <sokratis.katsikas@hig.no>, Stein Gjessing <stein.gjessing@ifi.uio.no>, Stephen Wolthusen <stephen.wolthusen@hig.no>, Stian Løvold <>, Svetlana Boudko <>, Syead Nusrat Nur <syeadnn@ifi.uio.no>, Thomas Kemmerich <thomas.kemmerich@ntnu.no>, Tina Maurstad Larsson <>... further results
Example
ongoing projects, based on [[Category:Project]] [[Due_date::> {{#expr:{{#time: Y|now}}}}]]
- see example in Concept:Ongoing_Projects
- CURRENTYEAR is 2026, CURRENTTIME is 02:56, LOCALTIME is 02:56
- date: 25 Februar 2016 or "now": 16 Sep 2026, using H:i for hours and minutes
- see all time examples in: Help:Extension:ParserFunctions
recent pages
- Societal Security (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:59:28)
- DHP4DPI/Equipment (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:57:39)
- DHP4DPI (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:56:27)
- Jimma University (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:54:26)
- Hordofa Gutema (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:53:58)
- Misra Abdulahi (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:52:44)
- Mahima Venkateswaran (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 14 September 2026 07:52:35)
- Integrity (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 8 September 2026 13:58:08)
- Confidentiality (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 8 September 2026 13:58:04)
- Availability (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 8 September 2026 13:58:02)
pages from 2013
- Main page (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 21 December 2013 22:17:09)
- Oulu (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 21 December 2013 16:34:48)
- UiO (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 21 December 2013 16:29:05)
- UNIK (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:51:30)
- FreeSecEDU UiO (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:49:19)
- PM (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:18:47)
- Output (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:18:24)
- Email (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:18:21)
- Partner Abbreviation (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:17:56)
- Creates pages with form (Modification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.: 20 December 2013 14:14:22)
recent pages in slideshow
Note: format=slideshow is supported in this version, and shown in:
recent pages, random
[[modification date::+]] shows only pages that exist (not deleted ones)
- Transport Layer Security
- Courses
- UNIK4710-L6-v13-part2.pdf

- Lecture DigitalPlatforms Development IN5390 Oct2021.pdf
Variables
- ARTICLEPAGENAME, TALKPAGENAME
- see more http://en.wikipedia.org/wiki/Help:Magic_words