Module talk:WikidataIB/sandbox1/testing

From HandWiki

Local parameter, fetchwikidata, suppressfields

Article Code Result
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |Fred Bloggs}} Fred Bloggs
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=author; number_of_pages |name=author}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=title; number_of_pages |name=author}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |Freda Bloggs}} Freda Bloggs
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |spf=author}}note
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |spf=author |name=author}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |spf=title |name=author}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |spf=author |name=author |Freda Bloggs}}

dagger Note that when a blacklist is supplied, a field name is also needed, otherwise the call returns nothing.

Only sourced

Article Code Result
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |osd=no}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |osd=yes}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P166 |fwd=ALL |osd=no}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P166 |fwd=ALL |osd=yes}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P166 |fwd=ALL |osd=}}

No icon

Article Code Result
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |noicon=no}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |noicon=yes}}
(Q1396889) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1396889 |P50 |fwd=ALL |noicon=}}

getValue for dates

Article Code Result
(Q357585) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q357585 |P569 |fwd=ALL |osd=no}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |bc=BC}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |bc=BCE}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |df=mdy}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |df=y}}
(Q51673) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q51673 |P569 |fwd=ALL |osd=no |lang=fr}}
(Q151973) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no}}
(Q151973) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |bc=BC}}
(Q151973) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |df=mdy}}
(Q151973) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q151973 |P569 |fwd=ALL |osd=no |df=y}}
(Q1817) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1817 |P569 |fwd=ALL |osd=no}}
(Q1817) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q1817 |P570 |fwd=ALL |osd=no}}
For (Q61714940), (P570):
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P570 |qid=Q61714940}}
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P570 |qid=Q61714940 |qual=ALL}}
For (Q142), (P610):
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P610 |qid=Q142}}
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P610 |qid=Q142 |qual=ALL}}
For (Q1048), (P569):
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P569 |qid=Q1048}}
  • {{#invoke:WikidataIB/sandbox1 |getValue |ps=1 |P569 |qid=Q1048 |qual=ALL}}

maxvals

(P106)

Article Code Result
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |locally supplied value}} locally supplied value
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |2=locally supplied value}} locally supplied value
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |2=}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=1}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=4}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=99}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=no |qid=Q42 |maxvals=0}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fetchwikidata=ALL |onlysourced=yes |qid=Q42 |maxvals=0}}

Quantity handling

(P2046), (P2044)

Article Code Result
(Q2256) {{#invoke:WikidataIB/sandbox1 |getValue |P2046 |qid=Q2256 |fwd=ALL |osd=no}}
(Q2256) {{#invoke:WikidataIB/sandbox1 |getValue |P2046 |qid=Q2256 |fwd=ALL |osd=no |unitabbr=yes}}
(Q2256) {{#invoke:WikidataIB/sandbox1 |getValue |P2046 |qid=Q2256 |fwd=ALL |osd=no |unitabbr=yes |conv=y}}
(Q18208369) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q18208369 |P2044 |ps=1 |uabbr=y |conv=y}}
(Q4574072) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q4574072 |P2044 |ps=1 |uabbr=y |conv=y}}
(Q25271) {{#invoke:WikidataIB/sandbox1 |getValue |qid=Q25271 |P2044 |ps=1 |uabbr=y |conv=y}}

List handling

Article Code Result
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |sep=" – "}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=hlist}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=ubl}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getValue |P106 |fwd=ALL |osd=no |qid=Q42 |list=prose}}

Getting value and qualifiers

(P1376) for (Q71)
Qualifiers: (P580) and (P582)
Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P580}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P582}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P1326}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=DATES}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL}}
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL |sep=" or " |qsep=" to "}}

(P36) for (Q142)
Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |P36 |fwd=ALL |osd=no |qid=Q142 |qual=DATES |list=ubl}}

(P610) for (Q142)
Qualifiers: (P1326) is handled to include "before "
Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142}}
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=DATES}}
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=P1326}}
{{#invoke:WikidataIB/sandbox1 |getValue |P610 |fwd=ALL |osd=no |qid=Q142 |qual=P1326 |list=hlist}}

Scaling quantities

(P2131) for (Q30) and (Q183)
Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |uabbr=y}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=3}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=3 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=6}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=6 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=9}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=9 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=12}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=12 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale= |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=10}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=10 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=-10}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=-10 |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=auto}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=A |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=auto}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q30 |P2131 |rank=b |fwd=ALL |osd=n |scale=A |uabbr=y}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q183 |P2131 |rank=b |fwd=ALL |osd=n |scale=auto}}}
{{#invoke:WikidataIB/sandbox1 |getValue |qid=Q183 |P2131 |rank=b |fwd=ALL |osd=n |scale=A |uabbr=y}}}

Ranks

Fetching the names of the (P170) from (Q29016906) (one value preferred):

Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no}}
{{#invoke:WikidataIB/sandbox1 |getPreferredValue |P170 |fwd=ALL |qid=Q29016906 |osd=no}}
Using getValue only:
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no |rank=}}
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no |rank=p}}
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no |rank=n}}
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no |rank=b}}
{{#invoke:WikidataIB/sandbox1 |getValue |P170 |fwd=ALL |qid=Q29016906 |osd=no |rank=x}}

Fetching the values of (P180) from (Q29016906) (no values preferred):

Code Result
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no}}
{{#invoke:WikidataIB/sandbox1 |getPreferredValue |P180 |fwd=ALL |qid=Q29016906 |osd=no}}
Using getValue only:
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=}}
{{#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}}
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=b}}
{{#invoke:WikidataIB/sandbox1 |getValue |P180 |fwd=ALL |qid=Q29016906 |osd=no |rank=x}}

Using template – Fetching the names of the (P170) from (Q29016906) (one value preferred):

Code Result
{{wdib |P170 |qid=Q29016906 |fwd=ALL |osd=no}}
{{wdib |P170 |qid=Q29016906 |fwd=ALL |osd=no |rank=p}}
{{wdib |P170 |qid=Q29016906 |fwd=ALL |osd=no |rank=n}}
{{wdib |P170 |qid=Q29016906 |fwd=ALL |osd=no |rank=best}}
{{wdib |P170 |qid=Q29016906 |fwd=ALL |osd=no |rank=xyz}}

Language code

(Q16240603) {{#invoke:WikidataIB/sandbox1 |getValue |P734 |qid=Q16240603 |fwd=ALL | osd=no | linked=no |lang=}}
(Q16240603) {{#invoke:WikidataIB/sandbox1 |getValue |P734 |qid=Q16240603 |fwd=ALL | osd=no | linked=no |lang=en}}
(Q16240603) {{#invoke:WikidataIB/sandbox1 |getValue |P734 |qid=Q16240603 |fwd=ALL | osd=no | linked=no |lang=ru}}

Monolingual text handling

Testing getValue using (P1477) for (Q16185856)
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no}}
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no |lang=}}
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no |lang=en}}
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no |lang=en-gb}}
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no |lang=de}}
(Q16185856) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q16185856 |fwd=ALL |osd=no |lang=zh-mo}}
Testing getValue using (P1477) for (Q5816)
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no}}
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no |lang=}}
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no |lang=en}}
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no |lang=en-gb}}
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no |lang=gu}}
(Q5816) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q5816 |fwd=ALL |osd=no |lang=zh-mo}}
Testing getValue using (P1477) for (Q1001)
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no}}
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no |lang=}}
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no |lang=en}}
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no |lang=en-gb}}
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no |lang=gu}}
(Q1001) {{#invoke:WikidataIB/sandbox1 |getValue |P1477 |qid=Q1001 |fwd=ALL |osd=no |lang=zh-mo}}

Coordinates

Code Result
{{coord |-24.627333 |-70.404167 |display=inline}} [ ⚑ ] 24°37′38″S 70°24′15″W / 24.627333°S 70.404167°W / -24.627333; -70.404167
{{coord |-24.627333 |-70.404167 |display=inline |format=dms}} [ ⚑ ] 24°37′38″S 70°24′15″W / 24.627333°S 70.404167°W / -24.627333; -70.404167
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628}}
{{#invoke:WikidataIB/sandbox1 |getCoords |fwd=ALL |osd=no |qid=Q265628 |display=inline}}
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628 |format=dms}}
{{#invoke:WikidataIB/sandbox1 |getCoords |fwd=ALL |osd=no |qid=Q265628 |display=inline|format=dms}}
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628 |format=dec}}
{{#invoke:WikidataIB/sandbox1 |getCoords |fwd=ALL |osd=no |qid=Q265628 |display=inline|format=dec}}
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628 |noicon=true |show=long}}
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628 |noicon=true |show=lat}}
{{#invoke:WikidataIB/sandbox1 |getValue |P625 |fwd=ALL |osd=no |qid=Q265628 |noicon=true |show=longlat}}

getQualifierValue

Date precision is month
In (Q1513315): property (P793) equal to (Q385378) has a (P580) qualifier
Code Result
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P793 |pval=Q385378 |qual=P580 |fwd=ALL |qid=Q1513315}}
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P793 |pval=Q385378 |qual=P580 |fwd=ALL |qid=Q1513315 |osd=no}}
Date precision is day
In (Q151973): property (P26) equal to (Q3469983) has a (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}}
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q3469983 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no |df=mdy}}
Multiple date values
In (Q151973): property (P26) equal to (Q34851) has (P580) qualifiers
Code Result
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973}}
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no}}
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P26 |pval=Q34851 |qual=P580 |fwd=ALL |qid=Q151973 |osd=no |df=mdy}}
Qualifier value is an article
In (Q1513315): property (P2670) equal to (Q1205231) has an (P31) qualifier
Code Result
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P2670 |pval=Q1205231 |qual=P31 |fwd=ALL |qid=Q1513315}}
{{#invoke:WikidataIB/sandbox1 |getQualifierValue |P2670 |pval=Q1205231 |qual=P31 |fwd=ALL |qid=Q1513315 |osd=no}}

getValueByQual

In (Q10990), the value of the property (P443) which has qualifier (P407) equal to (Q7979) is:

{{#invoke:WikidataIB/sandbox1 |getValueByQual |qid=Q10990 |P443 |qualID=P407 |qvalue=Q7979 |fwd=ALL |osd=no |noicon=true}}

getValueByLang

In (Q10990), the value of the property (P443) which has the fixed qualifier "language of work or name" equal to a given language code (or default) is:

{{#invoke:WikidataIB/sandbox1 |getValueByLang |qid=Q10990 |P443 |fwd=ALL |osd=no |noicon=true}}
{{#invoke:WikidataIB/sandbox1 |getValueByLang |qid=Q10990 |P443 |fwd=ALL |osd=no |noicon=true |lang=sv}}
{{#invoke:WikidataIB/sandbox1 |getValueByLang |qid=Q10990 |P443 |fwd=ALL |osd=no |noicon=true |lang=en}}
{{#invoke:WikidataIB/sandbox1 |getValueByLang |qid=Q10990 |P443 |fwd=ALL |osd=no |noicon=true |lang=en-gb}}
{{#invoke:WikidataIB/sandbox1 |getValueByLang |qid=Q10990 |P443 |fwd=ALL |osd=no |noicon=true |lang=en-us}}

getDescription

Testing getDescription
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |1=}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |wikidata}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |1=wikidata}}
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |locally supplied description}} locally supplied description
(Q42) {{#invoke:WikidataIB/sandbox1 |getDescription |qid=Q42 |none}}

location

(Q248188)
Q248188
(Q9141)
{{#invoke:WikidataIB/sandbox1 |location |Q9141 |first=yes |skip=yes}} → Q9141
{{#invoke:WikidataIB/sandbox1 |location |Q9141 |first=yes}} → Q9141

But for the USA, we normally miss off the "US" part. So put it back and change Wikidata's "USA" to enwiki's "US" when skip is true.

(Q9188)
{{#invoke:WikidataIB/sandbox1 |location |Q9188 |first=yes |skip=yes}} → Q9188
{{#invoke:WikidataIB/sandbox1 |location |Q9188 |first=yes}} → Q9188

For British locations, it would skip to (Q145) which is the first instance of (Q6256). Unfortunately (Q21) is not an instance of a country, but an instance of a (Q3336843), according to Wikidata. So also test for Q3336843 when skip is true.

(Q248188)
{{#invoke:WikidataIB/sandbox1 |location |Q248188 |first=y |skip=y}} → Q248188
{{#invoke:WikidataIB/sandbox1 |location |Q248188 |first=y}} → Q248188

examine

Examining (Q1396889) (P18)
{{#invoke:WikidataIB/sandbox1 |examine |pid=P18 |qid=Q1396889}}
table#1 {

}

{{#invoke:WikidataIB/sandbox1 |examine |P18 |qid=Q1396889}}
table#1 {

}

{{#invoke:WikidataIB/sandbox1 |examine |pid=P18 |Q1396889}}
table#1 {

}

{{#invoke:WikidataIB/sandbox1 |examine |P18 |Q1396889}}
table#1 {

}

{{#invoke:WikidataIB/sandbox1 |examine |Q1396889 |P18}}
table#1 {

}

Using wrapper template
{{examine|Q1396889 |P18}}
Template:Examine

Format Dates

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