Discuss Help:Datatype "Record"
Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.
In case you are seeking support concerning individual questions, please have a look at this page. The Semantic MediaWiki user mailing list is always a good idea for seeking help.
- [View source↑]
- [History↑]
Contents
Thread title | Replies | Last modified |
---|---|---|
Splitting Multiple Page Records in Table | 3 | 21:06, 1 May 2015 |
Using HTML encoded characters in a record. | 1 | 17:11, 1 April 2013 |
I'm so happy to be using Semantics Wiki and it's doing great so far! My one question is there a way to split the results into individual records once I do an #Ask Query.
This is what I have atm for my Record Type: Has Dates:
Has fields:Tevent; Tdate
Tevent and Tdate are both text due to custom dates (fantasy)
Two pages currently have Has Dates: Event Description; Date of Event
Page 1 has 1 record
Page 2 has 2 records
On my Query Page called Timeline I have:
{{#ask: [[Has Dates::+]] | ?Has Dates=Date |+index=2 | ?Has Dates=Event |+index=1 | format=table }}
Finally what shows up is:
Page 1 | Event 1<Br /> Page 2 | Event 2<br /> Event 3<br />
Is there a way that I could get it to be something like:
Page 1 | Event 1 Page 2 | Event 2 Page 2 | Event 3
Admittedly I never used this datatype but I think that this is the best you can get out of it. Rather use subobjects. This example shows something similar to what you probably want to achieve.
Ah I tried to get that to work but it seemed like a lot more than I am prepared for. However, I was able to get it to work. Instead of querying the Record Type I just queried the fields individually and was able to get the results I wanted.
Essentially instead of:
{{#ask: [[Has Dates::+]] | ?Has Dates=Date |+index=2 | ?Has Dates=Event |+index=1 | format=table }}
I wound up querying this way:
{{#ask: [[Tdate::+]] | ?Tdate=Date | ?Tevent=Event | format=table }}
Seems to be working so far! Thanks for the idea and helping me look more outside the box!
Is there anyway to allow for a non-binding space
or other HTML encoded character to be used in a semantic record? The issue I am running into is that the ;
character gets treated by the software as the end of a record.
For example: Say I have a marriage record that is set up to have the last names of 2 people who got married, the year of their marriage and the country they were married in.
[[has marriage::Jones & Smith; 1990; United States]]
seems light it should work. The problem is that the &
gets encoded as &
. Then the software sees the ;
and I end up with a record that looks like: Jones & Smith; 1990
because the ;
at the end of &
is treated as the end of one part of the record. Anyone know any way around this?
I do not think that this will be possible. Why not try to use subobjects instead?