Template:FieldTypeReturnValues: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="font-size:120%" | {| class="wikitable" style="font-size:120%" | ||
|+ Field Type Return Values | |||
|- | |- | ||
! Field type !! JavaScript object !! Examples | ! Field type !! JavaScript object !! Examples | ||
|- | |- | ||
| Text , Hyperlink, Password, Phone, Email, | | width="30%" | Text , Hyperlink, Password, Phone, Email, Barcode, Radio buttons, Single-choice list, Calculation (string result) | ||
| [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''String'''] | | width="42%" | [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''String'''] | ||
| "abc" | | width="28%" | "abc" | ||
|- | |- | ||
| Integer, Real number, Rating, Currency, Calculation (number result) | | Integer, Real number, Integer values, Rating, Currency, Calculation (number result) | ||
| [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number '''Number'''] | | [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number '''Number'''] | ||
| 42, 42.1 | | 42, 42.1 | ||
Line 19: | Line 19: | ||
| true, false | | true, false | ||
|- | |- | ||
| Multiple-choice list | | Checkboxes, Multiple-choice list | ||
| [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String ''' | | [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''strings'''] | ||
| ["Shirts", "Pants", "Socks"] | | ["Shirts", "Pants", "Socks"] | ||
|- | |||
| Image | |||
| [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''strings'''] | |||
| ["file:///storage/emulated/0/DCIM/image01.png", "file:///storage/emulated/0/DCIM/image02.png"] | |||
|- | |- | ||
| Link to entry | | Link to entry | ||
| [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [[Triggers#Object Entry|''' | | [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [[Triggers#Object Entry|'''entries''']]<br/>Each array element has a method ''field()'' for access to values of fields of entries of the linked library. Example:<br/>field("localField")[i].field("remoteField") | ||
| [e1, e2, e3] | | [e1, e2, e3, ...] | ||
|} | |} |
Latest revision as of 15:04, 5 April 2021
Field type | JavaScript object | Examples |
---|---|---|
Text , Hyperlink, Password, Phone, Email, Barcode, Radio buttons, Single-choice list, Calculation (string result) | String | "abc" |
Integer, Real number, Integer values, Rating, Currency, Calculation (number result) | Number | 42, 42.1 |
Date , DateTime, Time | Date | |
Checkbox (Boolean) | Boolean | true, false |
Checkboxes, Multiple-choice list | Array of strings | ["Shirts", "Pants", "Socks"] |
Image | Array of strings | ["file:///storage/emulated/0/DCIM/image01.png", "file:///storage/emulated/0/DCIM/image02.png"] |
Link to entry | Array of entries Each array element has a method field() for access to values of fields of entries of the linked library. Example: field("localField")[i].field("remoteField") |
[e1, e2, e3, ...] |