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 753:
==Courtesy notice==
[[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]] You are invited to join the discussion at [[:Wikipedia talk:AutoWikiBrowser/Rename template parameters#Wikidata aliases|Wikipedia talk:AutoWikiBrowser/Rename template parameters § Wikidata aliases]]. <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> 06:29, 13 August 2021 (UTC)<!-- [[Template:Please see]] -->
== Making sure pieces of data belong to each other? ==
Hi, could someone explain more about this quote from the documentation?
Combine multiple commands into one call to this template, instead of making multiple calls to this template with one command each, to be sure that all the returned pieces of information belong to each other.
I assume this means that if I make multiple calls with one command each, then the pieces of information may belong to different statements. Is my understanding correct? If so, when and why does this happen, and can you give a working example?
On another note, can multiple calls of the same module/template code result in different data being returned on different calls? [[User:Notsniwiast|Winston]] ([[User talk:Notsniwiast|talk]]) 05:23, 5 September 2021 (UTC)
:{{ping|Notsniwiast}} Yes, your understanding is correct. For example, if you would like to take the {{Property|1419}} of the {{Q|2}} together with its {{Property|1480}} and you request those in separate calls, then you don't get the desired result:
:<code><nowiki>{{wd|property|Q2|P1419}} ({{wd|qualifier|single|Q2|P1419|P1480}})</nowiki></code> → geoid (roughly)
:If you are under the assumption that always the claim with the preferred rank is used, then you will be surprised to see "roughly" returned. This is because the preferred "geoid" property does not have a sourcing circumstances qualifier, but some with a normal rank do, so it simply selects these as they are the best ranked claims that do have a qualifier value of this type (I've added <code>single</code> just to return the qualifier of the first of two matching claims it finds). Instead, you should do this:
:<code><nowiki>{{wd|property|qualifier|Q2|P1419|P1480}}</nowiki></code> → geoid
:You could use the <code>preferred</code> flag in the first example to restrict access to claims with that rank, but if there is more than one preferred claim then you end up in the same situation.
:Also, I don't think multiple calls with the same parameters could result in different data, assuming that Wikidata always returns claims/statements in the same order (even for claims with the same rank). [[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>]] 22:54, 15 September 2021 (UTC)
|