« Example for dataype record and results format eventcalendar » : différence entre les versions
(content) Balise : Éditeur de wikicode 2017 |
(Test cases) Balise : Éditeur de wikicode 2017 |
||
Ligne 8 : | Ligne 8 : | ||
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 === | |||
{{#ask: | |||
[[ERE_ScheduleEvent.ERE_Name::{{PAGENAME}}]] | |||
|mainlabel=shift | |||
|?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 == | |||
'''This may not even make sense from this page - how would the calendar sensibly list the shift and the name together? ''' | |||
{{#ask: | |||
[[ERE_ScheduleEvent.ERE_Name::{{PAGENAME}}]] | |||
|mainlabel=shift | |||
|?ERE_ScheduleEvent.ERE_Day=date | |||
|?ERE_ScheduleEvent.ERE_Name=title | |||
|format=eventcalendar | |||
|default=No scheduled shifts found. | |||
|links=all | |||
|limit=1000 | |||
}} | |||
[[Category: Example for dataype record and results format eventcalendar| * ]] | [[Category: Example for dataype record and results format eventcalendar| * ]] |
Version du 31 janvier 2019 à 04:00
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
No scheduled shifts found.
all data queried as eventcalendar
This may not even make sense from this page - how would the calendar sensibly list the shift and the name together? No scheduled shifts found.