Difference between revisions of "REST API:Field Type Reference"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 18: Line 18:
| Currency
| Currency
|
|
Specify a decimal value, with no currency symbol and no separators other than the decimal point.  
* Specify a decimal value, with no currency symbol and no separators other than the decimal point.  


|-
|-
Line 28: Line 28:
| [[Date Format|Date]]  
| [[Date Format|Date]]  
|
|
A date.
* A date.


|-
|-
| [[Date Format|Date time]]  
| [[Date Format|Date time]]  
|  
|  
<span id="Date_time">A date and time.<span>
* <span id="Date_time">A date and time.<span>


|-
|-
Line 43: Line 43:
| Email Address  
| Email Address  
|  
|  
A string containing text of the form ''name''@''domain''.''type''. Example: <tt>friend@somewhere.com</tt>
* A string containing text of the form ''name''@''domain''.''type''. Example: <tt>friend@somewhere.com</tt>


|-
|-
| File Field  
| File Field  
|  
|  
To upload a file, use the [[...]]
* To upload a file, use the [[...]]


|-
|-
Line 58: Line 58:
| [[Global Picklist]]
| [[Global Picklist]]
|
|
Specify a picklist value.
* Specify a picklist value.


|-
|-
| <span id="image">Image Field</span>
| <span id="image">Image Field</span>
|
|
To upload an image file, use the [[...]]
* To upload an image file, use the [[...]]


|-
|-
| [[Lookup]]
| [[Lookup]]
|
|
Specify a record ID from the target object.
* Specify a record ID from the target object.


|-
|-
| [[Multiple Checkboxes]]
| [[Multiple Checkboxes]]
|
|
A comma-separated list of checkbox values.
* A comma-separated list of checkbox values.


|-
|-
| [[Multi Object Lookup]]
| [[Multi Object Lookup]]
|
|
The format is <tt>objectName:recordID</tt>. For example: <tt>cases:12345678</tt>
* The format is <tt>objectName:recordID</tt>. For example: <tt>cases:12345678</tt>


|-
|-
Line 89: Line 89:
| Number
| Number
|  
|  
An integer from -2,147,483,646 to 2,147,483,647.
* An integer from -2,147,483,646 to 2,147,483,647.


|-
|-
| Number with decimals
| Number with decimals
|  
|  
A number with a decimal point (and no other separators). The number of decimal places is specified in the field definition.  
* A number with a decimal point (and no other separators). The number of decimal places is specified in the field definition.  


|-
|-
| Percentage
| Percentage
|  
|  
A decimal value in the range 0 to 1. The number of decimal places is specified in the field definition.  
* A decimal value in the range 0 to 1. The number of decimal places is specified in the field definition.  


|-
|-
| Phone/Fax
| Phone/Fax
|  
|  
A string of digits, with or without formatting. (Formatting this supplied is preserved.  For example, "123.456.7890". Digits entered without formatting are displayed in the default format:  
* A string of digits, with or without formatting. (Formatting this supplied is preserved.  For example, "123.456.7890". Digits entered without formatting are displayed in the default format:  
:* 7 digits ("1234567") displays as "123-4567".
:* 7 digits ("1234567") displays as "123-4567".
:* 10 digits "1234567890" displays as "(123) 456-7890".
:* 10 digits "1234567890" displays as "(123) 456-7890".
Line 120: Line 120:
| Radio Buttons
| Radio Buttons
|
|
Specify one of the radio button values.
* Specify one of the radio button values.
{{:Common:SpecifyingEnumerationValues}}
{{:Common:SpecifyingEnumerationValues}}


Line 141: Line 141:
| [[Date Format|Time]]  
| [[Date Format|Time]]  
|  
|  
A time. For example, "6:50 PM".
* A time. For example, "6:50 PM".
{{:Common:Date_Time_Display_Types}}
{{:Common:Date_Time_Display_Types}}



Revision as of 21:32, 2 August 2013

This table shows how to format data for each of the Field Display Types in a platform object, when using the REST API.

Field Display Types Description
Auto Number

n/a

Checkbox
  • Specify 1 for Yes/True, 0 for No/False
Currency
  • Specify a decimal value, with no currency symbol and no separators other than the decimal point.
Custom Control

n/a

Date
  • A date.
Date time
  • A date and time.
Dependent Picklist

n/a

Email Address
  • A string containing text of the form name@domain.type. Example: friend@somewhere.com
File Field
  • To upload a file, use the ...
Formula

n/a

Global Picklist
  • Specify a picklist value.
Image Field
  • To upload an image file, use the ...
Lookup
  • Specify a record ID from the target object.
Multiple Checkboxes
  • A comma-separated list of checkbox values.
Multi Object Lookup
  • The format is objectName:recordID. For example: cases:12345678
Multi Select Picklist

(Multi Select Global Pick List)

A comma-separated list of picklist values.

Number
  • An integer from -2,147,483,646 to 2,147,483,647.
Number with decimals
  • A number with a decimal point (and no other separators). The number of decimal places is specified in the field definition.
Percentage
  • A decimal value in the range 0 to 1. The number of decimal places is specified in the field definition.
Phone/Fax
  • A string of digits, with or without formatting. (Formatting this supplied is preserved. For example, "123.456.7890". Digits entered without formatting are displayed in the default format:
  • 7 digits ("1234567") displays as "123-4567".
  • 10 digits "1234567890" displays as "(123) 456-7890".
  • 11 digits ("12345678901") displays 1-234-567-8901
Note:
If the string is longer than 11 digits, it is displayed as entered.
In that case, it's helpful to provide the desired formatting.
Picklist
  • Specify one of the picklist values.
  • When you select this type for an object field, a text area lets you enter values.
    • Enter the names of the values, one per line, in the order they will be displayed.
    • When the user makes a selection, the value that is stored is the text entered on that line. So:
      1. If you change the order later, existing values are not affected.
      2. If you remove an entry at a later date, or change the spelling of a value, existing records that have that value are not affected. Either clean up the object data, or take that possible value into account in your design for backward compatibility.
Radio Buttons
  • Specify one of the radio button values.
  • When you select this type for an object field, a text area lets you enter values.
    • Enter the names of the values, one per line, in the order they will be displayed.
    • When the user makes a selection, the value that is stored is the text entered on that line. So:
      1. If you change the order later, existing values are not affected.
      2. If you remove an entry at a later date, or change the spelling of a value, existing records that have that value are not affected. Either clean up the object data, or take that possible value into account in your design for backward compatibility.
Rich Text Area
  • A string containing text and a limited number of HTML tags:
    bold, italics, numbered lists, bullet lists, image tags
Text Area
  • A multi-line string that can contain alphanumerics (A-Z, a-z, 0-9) and special characters: / @ . - $ %
Text Field
  • A string containing a single line of text. Text can include alphanumerics (A-Z, a-z, 0-9) and special characters: / @ . - $ %
Time
  • A time. For example, "6:50 PM".
  • As Entered - The date/time is stored and displayed exactly as entered.
  • Convert to Local Date/Time - (Default) Value is presumed to be entered in user's local time zone. The value is converted to the System Time Zone for storage in the database. When displayed, it is converted the user's time zone.
Note:
These options are available for new fields in Custom Objects. They are not available for standard Date/Time fields (for example: modified_time) or for Date/Time fields in the System Objects. Those fields are always converted.
URL A string containing a web address. For example: http://yourCompany.com