Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Wd) (bot |
m Archiving 1 discussion(s) from Module talk:Wd) (bot |
||
Line 524:
:I'm working on a more generic function to sort on any qualifier (or the property value itself), with which this can also be achieved. I'll let you know once it's available. [[User:Thayts|<span style="color:#466383;font-family:Georgia;font-style:italic;letter-spacing:1px">Thayts</span>]] [[User talk:Thayts|<span style="color:#7892A5">•••</span>]] 18:37, 8 August 2020 (UTC)
::{{u|Thayts}}, thanks, that sounds great; please do give me a ping when it's ready! <span style="color:#AAA"><small>{{u|</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}}</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 18:45, 8 August 2020 (UTC)
== Unable to fetch reference properly ==
For [https://www.wikidata.org/wiki/Q7227384 Q7227384], I'm trying to fetch the reference for the most recent (preferred rank) value of "employees" with the qualifier "applies to part, aspect, or form" equal to "faculty member" (i.e., I'm trying to fetch the reference for the current number of faculty members, as opposed to administrative staff). I was able to get the number of faculty via <code><nowiki>{{wikidata|property|normal+|current|P1128|P518=Q5428874|page=Pomona College}}</nowiki></code>, but trying to use <code><nowiki>{{wikidata|reference|normal+|current|P1128|P518=Q5428874|page=Pomona College}}</nowiki></code> returns ''all'' the references for the faculty count (although not the ones for administrative staff), not just the most recent, preferred rank one. I think this may be a bug, since the documentation here says that using "reference" rather than "references" should only return a single value. Help, anyone? <span style="color:#AAA"><small>{{u|</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}}</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 04:37, 14 August 2020 (UTC)
:{{u|Sdkb}}, <code>reference</code> only returns a single value ''per claim''. To access only one claim, use the <code>single</code> flag like so:
:<code><nowiki>{{wikidata|reference|normal+|current|single|P1128|P518=Q5428874|page=Pomona College}}</nowiki></code>
:This was indeed not properly documented, so I've improved that. [[User:Thayts|<span style="color:#466383;font-family:Georgia;font-style:italic;letter-spacing:1px">Thayts</span>]] [[User talk:Thayts|<span style="color:#7892A5">•••</span>]] 08:32, 14 August 2020 (UTC)
::{{u|Thayts}}, that works; thanks! <span style="color:#AAA"><small>{{u|</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}}</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 08:41, 14 August 2020 (UTC)
|