From Wikipedia, the free encyclopedia
Local parameter, fetchwikidata, suppressfields
† Note that when a blacklist is supplied, a field name is also needed, otherwise the call returns nothing.
Only sourced
No icon
getValue for dates
Article
|
Code
|
Result
|
Marcus Antonius Creticus (Q357585) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q357585 |P569 |fwd=ALL |osd=no}} |
2nd century BC
|
Mark Antony (Q51673) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no}} |
14 January 83 BC, 83 BC
|
Mark Antony (Q51673) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |bc=BC}} |
14 January 83 BC, 83 BC
|
Mark Antony (Q51673) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |bc=BCE}} |
14 January 83 BCE, 83 BCE
|
Mark Antony (Q51673) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |df=mdy}} |
January 14, 83 BC, 83 BC
|
Mark Antony (Q51673) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |df=y}} |
83 BC, 83 BC
|
Richard Burton (Q151973) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no}} |
10 November 1925
|
Richard Burton (Q151973) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |bc=BC}} |
10 November 1925
|
Richard Burton (Q151973) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |df=mdy}} |
November 10, 1925
|
Richard Burton (Q151973) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |df=y}} |
1925
|
Philip the Arab (Q1817) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1817 |P569 |fwd=ALL |osd=no}} |
c. 204
|
Philip the Arab (Q1817) |
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1817 |P570 |fwd=ALL |osd=no}} |
249, September 249, October 249
|
maxvals
occupation (P106)
Article
|
Code
|
Result
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |locally supplied value}} |
locally supplied value
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |2=locally supplied value}} |
locally supplied value
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |2=}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=1}} |
playwright
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=4}} |
playwright, screenwriter, novelist, children's writer
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=99}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=0}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=yes |qid=Q42 |maxvals=0}} |
screenwriter, novelist, science fiction writer, writer, musician
|
Quantity handling
area (P2046)
Article
|
Code
|
Result
|
Birmingham (Q2256) |
{{#invoke:WikidataIB/sandbox1 |getValue |P2046 |qid=Q2256 |fwd=ALL |osd=no}} |
267.77 ±0.01 square kilometre
|
Birmingham (Q2256) |
{{#invoke:WikidataIB/sandbox1 |getValue |P2046 |qid=Q2256 |fwd=ALL |osd=no |unitabbr=yes}} |
267.77 ±0.01 km²
|
List handling
Article
|
Code
|
Result
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer, musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |sep=" – "}} |
playwright – screenwriter – novelist – children's writer – science fiction writer – comedian – writer – musician
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=hlist}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=ubl}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=prose}} |
playwright, screenwriter, novelist, children's writer, science fiction writer, comedian, writer and musician
|
Getting value and qualifiers
- capital of (P1376) for Geneva (Q71)
- Qualifiers: start time (P580) and end time (P582)
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71}} |
canton of Geneva, Léman, Republic of Geneva, Republic of Geneva
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P580}} |
canton of Geneva (1815–), Léman (1798–), Republic of Geneva (1534–), Republic of Geneva (1813–)
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P582}} |
canton of Geneva, Léman (–1813), Republic of Geneva (–1798), Republic of Geneva (–1815)
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P1326}} |
canton of Geneva, Léman, Republic of Geneva, Republic of Geneva
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=DATES}} |
canton of Geneva (1815–), Léman (1798–1813), Republic of Geneva (1534–1798), Republic of Geneva (1813–1815)
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL}} |
canton of Geneva (1815–), Léman (1798–1813), Republic of Geneva (1534–1798), Republic of Geneva (1813–1815)
|
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL |sep=" or " |qsep=" to "}} |
canton of Geneva (1815–) or Léman (1798–1813) or Republic of Geneva (1534–1798) or Republic of Geneva (1813–1815)
|
- capital (P36) for France (Q142)
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getValue |P36 |fwd=ALL |osd=no |qid=Q142 |qual=DATES |list=ubl}} |
|
- highest point (P610) for France (Q142)
- Qualifiers: latest date (P1326) is handled by default
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142}} |
Mont Blanc, Barre des Écrins
|
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=DATES}} |
Mont Blanc (1860–), Barre des Écrins
|
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=P1326}} |
Mont Blanc, Barre des Écrins (before 1860)
|
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=P1326 |list=hlist}} |
|
Ranks
Fetching the names of the creator (P170) from Corisca and the Satyr (Q29016906) (one value preferred):
Fetching the values of depicts (P180) from Corisca and the Satyr (Q29016906) (no values preferred):
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no}} |
Corisca, satyr, nymph, wig
|
{{#invoke:WikidataIB/sandbox1 |getPreferredValue |P180 |fwd=ALL |qid=Q29016906 |osd=no}} |
Corisca, satyr, nymph, wig
|
{{#invoke:WikidataIB/sandbox1 |getNormalValue |P180 |fwd=ALL |qid=Q29016906 |osd=no}} |
Script error: The function "getNormalValue" does not exist.
|
Using getValue only:
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=}} |
Corisca, satyr, nymph, wig
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=p}} |
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=n}} |
Corisca, satyr, nymph, wig
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=b}} |
Corisca, satyr, nymph, wig
|
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=x}} |
Corisca, satyr, nymph, wig
|
Using template – Fetching the names of the creator (P170) from Corisca and the Satyr (Q29016906) (one value preferred):
Coordinates
getQualifierValue
- Date precision is month
- In South Pole Telescope (Q1513315): property significant event (P793) equal to construction (Q385378) has a start time (P580) qualifier
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P793 |pval=Q385378 |qual=P580 |fwd=ALL |qid=Q1513315}} |
November 2006
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P793 |pval=Q385378 |qual=P580 |fwd=ALL |qid=Q1513315 |osd=no}} |
November 2006
|
- Date precision is day
- In Richard Burton (Q151973): property spouse (P26) equal to Sally Burton (Q3469983) has a start time (P580) qualifier
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q3469983 |qual=P580 |fwd=ALL |qid=Q151973}} |
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q3469983 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no}} |
3 July 1983
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q3469983 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no |df=mdy}} |
July 3, 1983
|
- Multiple date values
- In Richard Burton (Q151973): property spouse (P26) equal to Elizabeth Taylor (Q34851) has start time (P580) qualifiers
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973}} |
15 March 1964
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no}} |
15 March 1964, 10 October 1975
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no |df=mdy}} |
March 15, 1964, October 10, 1975
|
- Qualifier value is an article
- In South Pole Telescope (Q1513315): property has part(s) of the class (P2670) equal to telescope mount (Q1205231) has an instance of (P31) qualifier
Code
|
Result
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P2670 |pval=Q1205231 |qual=P31 |fwd=ALL |qid=Q1513315}} |
altazimuth mount
|
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P2670 |pval=Q1205231 |qual=P31 |fwd=ALL |qid=Q1513315 |osd=no}} |
altazimuth mount
|
getDescription
Testing getDescription
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |1=}} |
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |wikidata}} |
English science fiction writer and humorist (1952–2001)
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |1=wikidata}} |
English science fiction writer and humorist (1952–2001)
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |locally supplied description}} |
locally supplied description
|
Douglas Adams (Q42) |
{{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |none}} |
|
Some test cases for the function formatDate. Call like {{#invoke:WikidataIB/sandbox1 |formatDate | 1 August 30 BCE |bc=BCE |df=dmy}}
Input date: 1 August 30 BCE, 12:39:56
no parameters |
1 August 30 BCE
|
bc=BC |
1 August 30 BC
|
bc=BCE |
1 August 30 BCE
|
bc=bc |
1 August 30 BC
|
bc=bce |
1 August 30 BCE
|
bc=XYZ |
1 August 30 BCE
|
df=dmy |
1 August 30 BCE
|
df=DMY |
1 August 30 BCE
|
df=mdy |
August 1, 30 BCE
|
df=MDY |
August 1, 30 BCE
|
df=ABC |
1 August 30 BCE
|
df=y |
30 BCE
|
bc=BCE df=dmy |
1 August 30 BCE
|
bc=BCE df=mdy |
1 August 30 BCE
|
bc=BCE df=y |
30 BCE
|
bc=BC df=dmy |
1 August 30 BC
|
bc=BC df=mdy |
August 1, 30 BC
|
bc=BC df=y |
30 BC
|
Input date: 20 January 2017, 12:39:56
no parameters |
20 January 2017
|
bc=BC |
20 January 2017
|
bc=BCE |
20 January 2017
|
bc=bc |
20 January 2017
|
bc=bce |
20 January 2017
|
bc=XYZ |
20 January 2017
|
df=dmy |
20 January 2017
|
df=DMY |
20 January 2017
|
df=mdy |
January 20, 2017
|
df=MDY |
January 20, 2017
|
df=ABC |
20 January 2017
|
df=y |
2017
|
bc=BCE df=dmy |
20 January 2017
|
bc=BCE df=mdy |
20 January 2017
|
bc=BCE df=y |
2017
|
bc=BC df=dmy |
20 January 2017
|
bc=BC df=mdy |
January 20, 2017
|
bc=BC df=y |
2017
|