Différences entre les versions de « Example for dataype record and results format eventcalendar »
(This editor is a pain in the ass. Where is my preview button without all the hoops?) Balise : Éditeur de wikicode 2017 |
m (→Test cases : sp) Balise : Éditeur de wikicode 2017 |
||
(9 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 5 : | Ligne 5 : | ||
== Background == | == Background == | ||
− | I want to have multiple "shift" pages (e.g. [[ERE_shift1]], [[ERE_shift2]]) where multiple calls to a template (e.g. [[Template:ERE_encode]]) encode data as record-type [[property:ERE ScheduleEvent]] with sub-properties | + | I want to have multiple "shift" pages (e.g. [[ERE_shift1]], [[ERE_shift2]]) where multiple calls to a template (e.g. [[Template:ERE_encode]]) encode data as record-type [[property:ERE ScheduleEvent]] with sub-properties [[Property:ERE_Day]] and [[Property:ERE_Name]]. |
I then want to show shift schedules for people (e.g [[ERE_person1]], [[ERE_person2]]). '''For now my problem is that when I try to use the record that way all calls together generate a giant gob of data that the queries then don't pull apart right. I want to figure out how to do this right. That would also give an example for type record, I could not find one on here.''' | I then want to show shift schedules for people (e.g [[ERE_person1]], [[ERE_person2]]). '''For now my problem is that when I try to use the record that way all calls together generate a giant gob of data that the queries then don't pull apart right. I want to figure out how to do this right. That would also give an example for type record, I could not find one on here.''' | ||
+ | == Test cases == | ||
+ | === all data queried as table === | ||
+ | '''OK, so here my problem is that instead of each "record" displaying as one cell, the rows are merged, so individual dates don't really seem to be associated wit particular people. This would be borne out by problems that happen in the eventcalendar where that would matter. How do I get [[Template:ERE encode]] to encode this properly? | ||
+ | |||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | | This is kind of tall so expand to see | ||
+ | |- | ||
+ | | | ||
+ | {{#ask: | ||
+ | [[ERE_ScheduleEvent.ERE_Name::+]] | ||
+ | |mainlabel=event | ||
+ | |?ERE_ScheduleEvent.ERE_Day=date | ||
+ | |?ERE_ScheduleEvent.ERE_Name=name | ||
+ | |format=table | ||
+ | |default=No scheduled shifts found. | ||
+ | |links=all | ||
+ | |limit=1000 | ||
+ | }} | ||
+ | |} | ||
+ | |||
+ | == all data queried as eventcalendar == | ||
+ | {{#ask: | ||
+ | [[ERE_ScheduleEvent.ERE_Name::{{PAGENAME}}]] | ||
+ | |mainlabel=event | ||
+ | |?ERE_ScheduleEvent.ERE_Day=start date | ||
+ | |?ERE_ScheduleEvent.ERE_Name=title | ||
+ | |format=eventcalendar | ||
+ | |default=No scheduled shifts found. | ||
+ | |links=all | ||
+ | |limit=1000 | ||
+ | |start=2019-01-01 | ||
+ | }} | ||
[[Category: Example for dataype record and results format eventcalendar| * ]] | [[Category: Example for dataype record and results format eventcalendar| * ]] |
Dernière version du 31 janvier 2019 à 05:11
This is an example of using semantic-mw:Help:Type_Record datatype record and semantic-mw:Help:Eventcalendar format
Caveat
for now this likely doesnt' work - that's why I am setting it up, I can't get it to work ;-)
Background
I want to have multiple "shift" pages (e.g. ERE_shift1, ERE_shift2) where multiple calls to a template (e.g. Template:ERE_encode) encode data as record-type property:ERE ScheduleEvent with sub-properties Property:ERE_Day and Property:ERE_Name. I then want to show shift schedules for people (e.g ERE_person1, ERE_person2). For now my problem is that when I try to use the record that way all calls together generate a giant gob of data that the queries then don't pull apart right. I want to figure out how to do this right. That would also give an example for type record, I could not find one on here.
Test cases
all data queried as table
OK, so here my problem is that instead of each "record" displaying as one cell, the rows are merged, so individual dates don't really seem to be associated wit particular people. This would be borne out by problems that happen in the eventcalendar where that would matter. How do I get Template:ERE encode to encode this properly?
This is kind of tall so expand to see | |||||||||
|
all data queried as eventcalendar
No scheduled shifts found.