Property talk:Test Record
Jump to navigation
Jump to search
- Property test case - Log
- Links
- Types (RoB): [1]
- Types (SMW): [2]
- - - -
- Annotation URI (SMW): [3]
- Boolean (SMW): [4]
- Code (SMW): [5]
- Date (SMW): [6]
- Email (SMW): [7]
- External identifier (SMW): [8]
- Geographic coordinates (SMW): [9]
- Monolingual text (SMW): [10]
- Number (SMW): [11]
- Page (SMW): [12]
- Quantity (SMW): [13]
- Record (SMW): [14]
- Reference (SMW): [15]
- Telephone number (SMW): [16]
- Temperature (SMW): [17]
- Text (SMW): [18]
- URL (SMW): [19]
- Limitations
- You cannot use the special "Display units" property to control how a specific field appears.
- You cannot set the layout of the values; they will always appear as a comma-separated list.
- ... Seems to related to normal properties with multiple-value entries. Not how Record data is displayed.
- Fields of records cannot be the basis for special purpose query formats such as Timeline or geography related ones, etc.
- 10) Property-Page Creation order (setup-1)
- Property:Test_Number_2: Type: Number.
- Property:Test_Number_1: Type: Number.
- Property:Test_Number: Type: Number.
- Property:Test_Record: Type: Record, Fields: Test_Number; Test_Number_1; Test_Number_2. (Setup 1)
- 11) ...
- Set:
[[Test_Record:: 123; 456; 789]]
- Set:
- Preview-Print:
11) 123 (456, 789)
- Preview-Facts:
Test_Record ? (?, ?) +S
- Save-Page
- Browse-Props:
Test_Record | 123 (456, 789) +S
- Property:Test_Record:
MvGulik/Test_Page +B 123 (456,789) +S
- Property:Test_Number:
MvGulik/Test_Page +B 123 +S
- Note: usageItalic font style. - Property:Test_Number_1:
MvGulik/Test_Page +B 456 +S >
- Same - Property:Test_Number_2:
MvGulik/Test Page +B 789 +S
- Same - Note: Although the display shown "MvGulik/Test Page", the name that needs to be used in data calls, in this case, is "User:MvGulik/Test Page" (ie: FULLPAGENAME)
- 12) Record selection (#ask)
{{#ask: [[Test Record::+]] |?Test_Record }}
{{#ask: [[Test Record:: 123, 456, 789]] |?Test_Record }}
{{#ask: [[Test Record:: ?, 456, ?]] |?Test_Record }}
{{#ask: [[Test Record::! 111,! 444,! 777]] |?Test_Record }}
{{#ask: [[Test Record::> 111,> 444,> 777]] |?Test_Record }}
{{#ask: [[Test Record::> 123,> 456,> 789]] |?Test_Record }}
{{#ask: [[Test Record::>>122,>>455,>>788]] |?Test_Record }}
- Notes:
- - Bad/Error:
{{#ask: [[Test Record::?,?,?]] |?Test_Record }}
, Use{{#ask: [[Test Record::+]] |?Test_Record }}
- 13) Fields display (#ask)
{{#ask: [[Test Record::+]]<br>|?Test_Record=v0 |+index=1<br>|?Test_Record=v1 |+index=2<br>|?Test_Record=v2 |+index=3<br>}}
- 14) #show ...
{{#show: User:MvGulik/Test Page |?Test_Record }}
{{#show: User:MvGulik/Test Page |?Test_Record.Test_Number }}
{{#show: User:MvGulik/Test Page |?Test_Record.Test_Number_1 }}
{{#show: User:MvGulik/Test Page |?Test_Record.Test_Number_2 }}
- 15) Notes:
- - The Test_Record field data also shows up in the related field(s) properties (in Italic instead of Normal font style).
- - Saving the same name:data pair, but now directly into a Record-field property, generates an additional independent property entry (Normal font style instead of Italic)
- 20) Record (setup-2)
- Property:Test_Record: Type: Record, Fields: Test_Number; Test_Number; Test_Number. (Setup-2)
- 21) ..
- Set:
[[Test_Record:: 123; 456; 789]]
- Save-Page
- Set:
- Property:Test_Record:
MvGulik/Test_Page +B 123 (123, 123) +S
- Property:Test_Number:
MvGulik/Test Page +B 123 +S, 456 +S, 789 +S
- Logic:
- Save-part: For each input record-entry, its saved to Test_Number (as record related property). Ergo: Test_Number:
123 + 456 + 789
. - Read part: For each record-entry, it pulls first Test_Number data. Ergo: Test_Record:
123 (123, 123)
.- This is a none useful data configuration/setup.
- Save-part: For each input record-entry, its saved to Test_Number (as record related property). Ergo: Test_Number:
- 30) Record in Record (possible?) (setup-3)
- Setup: just include an other record-type into a main record-type.
- Saving: Needs escaping of delimiter.
- Reading: ... ???/not sure yet/seems not possible/supported.
- (already set) Property:Test_Number_2: Type: Number.
- (already set) Property:Test_Number_1: Type: Number.
- (already set) Property:Test_Number: Type: Number.
- Property:Test_Record_1: Type: Record, Fields: Test_Number_1; Test_Number_2.
- Property:Test_Record: Type: Record, Fields: Test_Number; Test_Record_1.
- "Test_Record" Showing
MvGulik/Test Page +B 123 (456 (?)) +S
, the (?) part kinda indicates its not possible/supported. - "Test_Number" Showing
MvGulik/Test_Page +B 123 +S
, as expected. - "Test_Record_1" Showing
MvGulik/Test Page +B 456 (?) +S
, ... - "Test_Number_1" Showing
MvGulik/Test_Page +B 456 +S
, as expected. - "Test_Number_2" Showing no data.
- "Test_Record" Showing
- 31)
- Set:
[[Test_Record:: 123; 456\; 789]]
. Just a long shot. Seem to work ... overall usability still questionable. - Save-Page
- Set:
- Browse-Props:
Test_Record | 123 (456 (789)) +S
- Property:Test_Record:
MvGulik/Test_Page +B 123 (456 (789)) +S
- Property:Test_Number:
MvGulik/Test_Page +B 123 +S
- Property:Test_Record_1:
MvGulik/Test_Page +B 456 (789) +S
- Property:Test_Number_1:
MvGulik/Test_Page +B 456 +S >
- Property:Test_Number_2:
MvGulik/Test Page +B 789 +S
- Note: Relative slow retrieval of Test_Record data (Browse-props), might indicate its kinda system heavy. (look for other/better ways to check that)
- 32) Data retrieval (Some SMW #Ask method I did not know, called "property_chain")
- 1) #ask
{{#ask: [[Test Record::+]]
|?Test_Record=Rec
|?Test_Record=v0(a) |+index=1
|?Test_Record.Test_Number=V0(b)
|?Test_Record.Test_Record_1.Test_Number_1=V1(b)
|?Test_Record.Test_Record_1.Test_Number_2=V2(b)
}}
- Output: "MvGulik/Test Page | 123 (456 (789)) | 123 | 123 | 456 | 789"
- Note: The (a) and (b) methods can't be mixed (no/empty output)
- 2) #show
{{#show:User:MvGulik/Test Page|?Test Record}}
- - output: "123 (456 (789))"{{#show:User:MvGulik/Test Page|?Test Record.Test_Number}}
- - output: "123"{{#show:User:MvGulik/Test Page|?Test Record.Test Record_1}}
- - output: "456 (789)"{{#show:User:MvGulik/Test Page|?Test Record.Test Record_1.Test_Number_1}}
- - output: "456"{{#show:User:MvGulik/Test Page|?Test Record.Test Record_1.Test_Number_2}}
- - output: "789"
- ...