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

From AgileApps Support Wiki
imported>Aeric
(Created page with "This table shows how to format data for each of the Field Display Types in a platform object, when using the REST API. {| border="1" cellpadding="5" cellspacing="0" !Fi...")
Β 
imported>Aeric
Line 8: Line 8:
| Auto Number
| Auto Number
|
|
*Generates a unique number based on simple format rules and provided with a starting value
n/a
*Auto Number fields default to <tt>YYYY-MM-DD-{0000}</tt>, where the number between the curly braces <tt>{0000}</tt> increments automatically.
:*Curly braces <tt>{}</tt> are required to generate an auto number
:*The <tt>YYYY-MM-DD-</tt> prefix is optional. It generates values for year, month, and day.
:*Any prefix can be used.


|-
|-
| [[Checkbox]]
| [[Checkbox]]
|
|
*A single check box, where the checked value is "Yes/True" and unchecked value is "No/False"
* Specify 1 for Yes/True, 0 for No/False
* To apply a filter to a checkbox, or import a checkbox field, use:
::Yes/True = 1 or No/False = 0
* When specifying a formula for a default value, the formula must resolve to 1, 0, true, or false. (When typing it in directly, enter one of those values with no quotes around it.)


|-
|-
| Currency
| Currency
|
|
Displays currency in the format determined by the user's locale.
Specify a decimal value, with no currency symbol and no separators other than the decimal point. Β 


|-
|-
| [[Custom Control]]
| [[Custom Control]]
|
|
Custom Controls are [[Pages]] that use HTML and JavaScript to extend the functionality of a web page or customize its interface
n/a


|-
|-
| [[Date Format|Date]] Β 
| [[Date Format|Date]] Β 
|
|
A date.
A date. See "Date time", below.


|-
|-
Line 46: Line 39:
| [[Dependent Picklist]]
| [[Dependent Picklist]]
|
|
*A picklist that is dynamic based on values provided in another field.
n/a
*For example, a Picklist for T-Shirt ''Sizes'' might include entries for ''Adult'', ''Teen'' and ''Child''.
*The ''Adult'' list might include entries for S, M, L, XL, and XXL sizes.
*A ''Teens'' list might include similar entries, while the ''Child'' list might include entries for 0 - 6 mos., 6 - 12 mos., 1T, 2T, and 3T.
* The resulting hierarchy would be:
:*''Size''
::*''Adult''
:::* ''Adult Small''
:::* ''Adult Medium''
:::: etc.
::*''Child''
:::* ''Child 0 - 6 mos.''
:::* ''Child 6 - 12 mos.''
:::* etc.
::*''Teen''
:::* ''Teen Small''
:::* etc.
Β 
(Best practice is to include the entire hierarchy "path" in the entry, so that ''Adult Small'' is distinguished from ''Teen Small''. If the entries said simply, "Small", a shipping clerk might not be able to tell which size was intended.)


|-
|-
| Email Address Β 
| Email Address Β 
| Β 
| Β 
A text string of the form {name}@{domain}.{type}. Example: friend@somewhere.com
A string containing of the form {name}@{domain}.{type}. Example: friend@somewhere.com


|-
|-
| File Field Β 
| File Field Β 
| Β 
| Β 
Allows a file to be uploaded as part of the record
To upload a file, use the [[...]]


|-
|-
| [[Formula Fields|Formula]]
| [[Formula Fields|Formula]]
|
|
*Provides the ability to calculate dynamic values using [[Expressions]] and standard [[Formula Functions|Functions]]
n/a
If the formula return type is a DateTime or Time, then the time zone conversion options are available:
{{:Common:Date_Time_Display_Types}}


|-
|-
| [[Global Picklist]]
| [[Global Picklist]]
|
|
*A Global Picklist is a type of field that contains a list of values, and performs much the same as a Picklist field
Specify a picklist value.
*Global Picklists contain the kind of default values commonly used in all applications
:Example: US states, status level, priority, hat size, apparel size, component part numbers, etc.
*These predefined fields save time and can be used in any object.
*When adding a Global Picklist field to an object, you select from the set of Global Picklists that has been defined for this application.


|-
|-
| <span id="image">Image Field</span>
| <span id="image">Image Field</span>
|
|
* Allows an image file to be uploaded as part of the record.
To upload an image file, use the [[...]]


|-
|-
| [[Lookup]]
| [[Lookup]]
|
|
*A field used to link an object to another object.<br>''Learn more:'' [[Relating Objects Using Lookups]]
Specify a record ID from the target object.
*Automatically becomes a [[Multi Value Lookup]] type whenever two objects are joined by a many-to-many relationship
*Optionally, [[Lookup#Customize_Lookup_Field_Options|Customize Lookup Field Option]] or create [[Lookup#Self_Reference_Lookup|Self Reference Lookup]]
*This field type has additional display options that can be set when you use it in a [[Form]]. For example, you can choose to display it as Popup or Drop Down, and specify the sort order for the records that are shown to the user.<br>''Learn more:'' [[Forms#lookup|Lookup attributes]] in a Form


|-
|-
| [[Multiple Checkboxes]]
| [[Multiple Checkboxes]]
|
|
*Multiple checkboxes are displayed and are associated with a single field.
A comma-separated list of checkbox values.
*For example, choose your favorite movie genres:
::Action / Adventure / Animation / Comedy / Drama / Romance / Documentary / Children's / Fantasy / Sport / Thriller / Western
*Multiple checkboxes can be selected, for example: Comedy, Romance, Western
{{:Common:SpecifyingEnumerationValues}}
*If the user makes multiple selections, the value is stored as a comma-separated list. So:
**If you change the order of the values, new values may be stored differently than old ones.


|-
|-
| [[Multi Object Lookup]]
| [[Multi Object Lookup]]
|
|
A two stage-lookup where the user first selects the object to use, and then looks up a record in that object.
The format is <tt>objectName:recordID</tt>. For example: <tt>cases:12345678</tt>


|-
|-
Line 125: Line 85:
(Multi Select Global Pick List)
(Multi Select Global Pick List)
|
|
*A picklist containing multiple values from a Global Picklist
A comma-separated list of picklist values.
*Multiple values can be selected from the list and associated with a single field


|-
|-
| Number
| Number
| Β 
| Β 
A numeric (integer) field, for which you specify minimum and maximum values. The default minimum is 0. To go lower, specify a negative number, like -20. The maximum value is 999999999 (999,999,999). That number can be varied as well, up to the maximum integer size 2,147,483,647. (The smallest possible negative value is -2,147,483,646.)
An integer from -2,147,483,646 to 2,147,483,647.


|-
|-
| Number with decimals
| Number with decimals
| Β 
| Β 
A numeric field, for which you specify the number of decimal digits.
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 field in the range 0 to 1, for which you specify the number of decimal digits.
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. If digits are entered with spaces and punctuation marks, they are displayed and edited in exactly that form. (For example, "123.456.7890".) If a string of digits is entered without formatting, that is the way it appears when editing, but it is automatically formatted when the field is displayed: Β 
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".
:* 11 digits ("12345678901") displays 1-234-567-8901
:* 11 digits ("12345678901") displays 1-234-567-8901


:''Note:''<br>If the field has more than 11 digits, they are displayed as entered.<br>In that case, it's helpful to provide the desired formatting. Β 
:''Note:''<br>If the string is longer than 11 digits, it is displayed as entered.<br>In that case, it's helpful to provide the desired formatting. Β 


|-
|-
| [[Picklist]]
| [[Picklist]]
|
|
*A picklist is a type of field that contains a list of values, usually presented in a drop-down list; Examples:
*Specify one of the picklist values.
:*Types of things: Animal, Vegetable, Mineral
:*T-Shirt Size: Extra Small, Small, Medium, Large, Extra Large
*A single value can be selected from the list
{{:Common:SpecifyingEnumerationValues}}
{{:Common:SpecifyingEnumerationValues}}


Line 165: Line 121:
| Radio Buttons
| Radio Buttons
|
|
A list used to limit user selection to a single, specific value from a supplied list of values.
Specify one of the radio button values.
{{:Common:SpecifyingEnumerationValues}}
{{:Common:SpecifyingEnumerationValues}}


Line 171: Line 127:
| Rich Text Area
| Rich Text Area
|
|
An HTML-formatted text area
*A string containing text and a limited number of HTML tags:
*HTML formatting can include font styles, such as '''Bold''', ''Italics'', numbered lists and bullets or images (logos or art)
*: '''bold''', ''italics'', numbered lists, bullet lists, image tags
*Formatting tools are provided
''Considerations:''
:* <tt><nowiki><wbr></nowiki></tt> and <tt><nowiki></wbr></nowiki></tt> tags are not supported, as they are problematic when switching between edit and display modes. (To prevent issues, those tags are therefore removed before the content is displayed.)


|-
|-
| Text Area
| Text Area
|
|
* A multi-line String that can contain alphanumerics (A-Z, a-z, 0-9) and special characters: <tt> / @ . - $ % </tt>
* A multi-line string that can contain alphanumerics (A-Z, a-z, 0-9) and special characters: <tt> / @ . - $ % </tt>


|-
|-
| Text Field ||
| Text Field ||
* A String that containing a single line of text. Text can include alphanumerics (A-Z, a-z, 0-9) and special characters: <tt> / @ . - $ % </tt>
* A string containing a single line of text. Text can include alphanumerics (A-Z, a-z, 0-9) and special characters: <tt> / @ . - $ % </tt>


|-
|-
Line 193: Line 146:


|-
|-
| URL || String containing a web address. For example: http://yourCompany.com
| URL || A string containing a web address. For example: http://yourCompany.com
|}
|}
<noinclude>
<noinclude>

Revision as of 21:29, 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. See "Date time", below.

Date time

A date and time.

  • 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.
Dependent Picklist

n/a

Email Address

A string containing 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