{"__v":0,"_id":"58a151513d66350f00ab0f37","category":{"__v":21,"_id":"5614a5076ebd340d006a1bd0","pages":["5614a5086ebd340d006a1bd2","5614a68fb283fb0d00a487d5","5614aab0163a7d2100ab5f02","563301637b563e0d00904900","56330184b904a10d0032f797","563302048c9cda0d002526ff","5633020e62c48a0d00334df3","5633022c10b6040d0087946b","5633024010b6040d0087946d","5633026fb904a10d0032f799","5633034538f8aa0d00d31002","5633035062c48a0d00334df5","5633036949e16d0d00122537","5633037b38f8aa0d00d31005","5633038d38f8aa0d00d31007","5633039bb904a10d0032f79b","56330b63b904a10d0032f7a6","56330e587b563e0d00904908","56370adb0704070d00f06c0c","563bc913dfa1282b000dd33e","56ad51b279011b0d00c32aba"],"project":"5614a5066ebd340d006a1bcc","version":"5614a5076ebd340d006a1bcf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-07T04:52:23.567Z","from_sync":false,"order":1,"slug":"reference","title":"Reference"},"parentDoc":null,"project":"5614a5066ebd340d006a1bcc","user":"5614a4b8b283fb0d00a487d3","version":{"__v":5,"_id":"5614a5076ebd340d006a1bcf","project":"5614a5066ebd340d006a1bcc","createdAt":"2015-10-07T04:52:23.031Z","releaseDate":"2015-10-07T04:52:23.031Z","categories":["5614a5076ebd340d006a1bd0","5614aa6253a1830d0098e962","5633048649e16d0d00122539","563305b08c9cda0d00252704","563305dc8c9cda0d00252705"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-02-13T06:25:21.033Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"# Types are optional\n---\nIn Fieldbook, you don't have to set the type of a column when you create it, and columns don't have to have just one type of data. By default, columns are “generic”, and like spreadsheets, they can hold any type of data—text, numbers, dates, currency, percents, etc. These types are automatically recognized so that you can use them in sorts, filters and formulas.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/83c2835-Screen_Shot_2017-02-12_at_10.29.56_PM.png\",\n        \"Screen Shot 2017-02-12 at 10.29.56 PM.png\",\n        118,\n        172,\n        \"#f2f2f2\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\n# Setting a type\n----\nYou can add a column type in order to:\n\n* Validate data (only numbers are allowed in a Number column)\n* Make sure input is interpreted properly (in a Text column, a zip code like 01234 will not be turned into a number)\n* Make input easier (in a Currency column, the currency symbol will be added automatically)\n\nJust use the set-type option in the field menu.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9bf1c1b-E9vQi.png\",\n        \"E9vQi.png\",\n        1092,\n        1334,\n        \"#2d8534\"\n      ]\n    }\n  ]\n}\n[/block]\n# Text\n---\nText fields treat everything as text, even if it looks like a number, date, etc. This is good for:\n\n* Zip codes, where you want to keep leading zeroes\n* Tracking numbers or other large ID numbers\n* Codes that might be interpreted as dates\n\n# Number\n---\nNumber fields require numeric input. If you try to input something that's not a number, you'll get an error.\n\nNumbers can be formatted as:\n\n* 1,234.5 (decimal point or dot)\n* 1.234,5 (decimal comma)\n\nYour format is based on your [locale settings](doc:locale-settings).\n\nRight now, numbers are displayed with up to three decimal places. (In the future there will be a formatting setting for number of decimal places).\n\n# Currency\n---\nCurrency fields require a monetary value. You can specify the currency explicitly with a symbol like $ or €, or you just can enter a number and it will get the default currency configured on the field.\n\nRight now we support:\n\n* $ (Dollar)\n* £ (Pound)\n* € (Euro)\n* ₹ (Rupee)\n* ¥ (Yen)\n\nCurrency values will also use decimal point or comma depending on your settings.\n\nCurrency values display with either no decimal places (whole numbers) or exactly two decimal places, as needed. This will be a column setting in the future.\n\nWhen currency values are used in formulas, the result is usually a currency as well, e.g.:\n\n* $10 + $20 = $30\n* £100 * 5 = £500\n\n(However, adding different currencies is not recommended, as we don't currently calculate exchange rates.)\n\n# Percent\n---\nPercent fields require a percentage value. These are just numeric values formatted in a different way. If you enter a number, a percent sign will be added automatically.\n\nWhen percent values are added, they result in another percent; however, a percent times a number or currency will lose the percent: \n\n* 10% + 20% = 30%\n* 50% * 30 = 15\n* $100 * 5% = $5\n\n# Date\n---\nDate fields require a date. Dates can be input in a wide variety of formats, for example:\n\n* 10/21/2015\n* 10/21 (defaults to current year)\n* October 21st, 2015\n* Oct 21 2015\n* 21 Oct 2015\n* 2015-10-21\n\nEtc.\n\nThe first two examples above (with 10/21) assume month/day format, which is the default in the US. In other locales, day/month is the default (21/10). You can change this under your [locale settings](doc:locale-settings).\n\n**Tip:** In a Date column, you can even enter \"today\", \"tomorrow\" and \"yesterday\".\n\nRight now, no matter how dates are input, they are always displayed as numbers separated by slashes (6/6/2017). In the future there will be formatting options.\n\nDates can be used in formulas as well:\n\n* \"10/21/2015\" + 7 = 10/28/2015 (add or subtract a number to calculate days before/after)\n* \"10/21/2015\" - \"10/1/2015\" = 20 (subtract two dates to get the number of days between)\n\n# Day of year\n---\nDay-of-year fields represent a date independent of the year, such as an anniversary or a birthday. (The only way to get a day-of-year value is in a day-of-year column, since any day entered in a generic or date column will be interpreted as a date in the current year.)\n\n# Checkbox\n---\nCheckbox fields contain a true/false (“Boolean”) value. They're good for yes/no or on/off status columns like “Done”, “Active” or “Paid”.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c29cc34-e0a809a-Screen_Shot_2017-01-25_at_9.18.59_PM.png\",\n        \"e0a809a-Screen_Shot_2017-01-25_at_9.18.59_PM.png\",\n        1288,\n        824,\n        \"#f8f8f7\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nYou can use checkbox columns in [filters](doc:queries):\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/bb38a96-54a9d8d-Screen_Shot_2017-01-25_at_9.27.36_PM.png\",\n        \"54a9d8d-Screen_Shot_2017-01-25_at_9.27.36_PM.png\",\n        300,\n        75,\n        \"#f9f5f4\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nAnd in [formulas](doc:formulas):\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/34c813b-b64928a-Screen_Shot_2017-01-25_at_9.29.10_PM.png\",\n        \"b64928a-Screen_Shot_2017-01-25_at_9.29.10_PM.png\",\n        592,\n        155,\n        \"#2da334\"\n      ]\n    }\n  ]\n}\n[/block]\n# Pick list\n---\nPick list fields let you set a list of acceptable values. This is good for:\n\n* Status values: Red, Yellow, Green\n* Bucketing values: High, Medium, Low\n* Stages of a process: New, Working, Review, Done\n* Categories: Bug, Feature, Idea\n\nA pick list cell will have a dropdown with the items in it, in the order that you specify. You can also type values or type to filter a long list. Any value not on the list is an error.\n\nRight now you can only choose one value per cell. If you want to pick multiple values, use a [linked sheet](doc:linking-sheets).\n\nWhen you sort or group on a pick list column, it uses the order of the list (High, Medium, Low), not alphabetically (High, Low, Medium). When grouped on a pick list column, you can reorder the list by dragging the groups around. You can also edit the list directly when you set the field type.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/94b5089-Screen_Shot_2017-02-12_at_10.33.33_PM.png\",\n        \"Screen Shot 2017-02-12 at 10.33.33 PM.png\",\n        551,\n        467,\n        \"#eeeef0\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\n# Email and Website\n---\nEmail fields require that their input be in the format of an email (marty:::at:::example.com). Website fields are similar but require a link/URL (https://fieldbook.com).\n\n# Image and File\n---\nImage and File fields let you upload attachments. Image fields will display the image inline:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/307cd75-91hx9tlSSoIDJyiIkZAg_Screen_Shot_2016-01-30_at_3.52.17_PM.png\",\n        \"91hx9tlSSoIDJyiIkZAg_Screen Shot 2016-01-30 at 3.52.17 PM.png\",\n        461,\n        209,\n        \"#f6f5f5\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nFile fields show the attachment with its filename:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c30f8b1-8f275bd-Screen_Shot_2017-01-24_at_4.17.13_PM.png\",\n        \"8f275bd-Screen_Shot_2017-01-24_at_4.17.13_PM.png\",\n        421,\n        174,\n        \"#f6f7f6\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nMore about attachments: [Images and file attachments](doc:images-and-file-attachments)\n\n# Validation\n---\nAny field with a type will validate its input. If you're typing into a cell, invalid input will not be allowed.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b9695c3-Screen_Shot_2017-02-12_at_10.37.51_PM.png\",\n        \"Screen Shot 2017-02-12 at 10.37.51 PM.png\",\n        391,\n        136,\n        \"#313131\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nSame filling out a [form](doc:forms):\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3607f8f-Screen_Shot_2017-02-12_at_10.39.22_PM.png\",\n        \"Screen Shot 2017-02-12 at 10.39.22 PM.png\",\n        497,\n        242,\n        \"#fafafa\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nIf you paste a block of text, it's possible that some of the input is valid and some is not. Invalid input will go into the sheet, but will be highlighted as a red error cell. (You can filter for errors in a column using the iserror() function.)\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0361df7-Screen_Shot_2017-02-12_at_10.40.50_PM.png\",\n        \"Screen Shot 2017-02-12 at 10.40.50 PM.png\",\n        139,\n        201,\n        \"#f2ecec\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nIn the API, invalid input is rejected with an HTTP 400 error code.\n\n# Changing field type\n---\nYou can set or change a field type at any time, even if it has data in it already. Fieldbook will do its best to convert the column to the new data type. (Any cells that can't be converted will be highlighted in red as error cells.)","excerpt":"","slug":"data-types","type":"basic","title":"Data types"}
# Types are optional --- In Fieldbook, you don't have to set the type of a column when you create it, and columns don't have to have just one type of data. By default, columns are “generic”, and like spreadsheets, they can hold any type of data—text, numbers, dates, currency, percents, etc. These types are automatically recognized so that you can use them in sorts, filters and formulas. [block:image] { "images": [ { "image": [ "https://files.readme.io/83c2835-Screen_Shot_2017-02-12_at_10.29.56_PM.png", "Screen Shot 2017-02-12 at 10.29.56 PM.png", 118, 172, "#f2f2f2" ], "border": true } ] } [/block] # Setting a type ---- You can add a column type in order to: * Validate data (only numbers are allowed in a Number column) * Make sure input is interpreted properly (in a Text column, a zip code like 01234 will not be turned into a number) * Make input easier (in a Currency column, the currency symbol will be added automatically) Just use the set-type option in the field menu. [block:image] { "images": [ { "image": [ "https://files.readme.io/9bf1c1b-E9vQi.png", "E9vQi.png", 1092, 1334, "#2d8534" ] } ] } [/block] # Text --- Text fields treat everything as text, even if it looks like a number, date, etc. This is good for: * Zip codes, where you want to keep leading zeroes * Tracking numbers or other large ID numbers * Codes that might be interpreted as dates # Number --- Number fields require numeric input. If you try to input something that's not a number, you'll get an error. Numbers can be formatted as: * 1,234.5 (decimal point or dot) * 1.234,5 (decimal comma) Your format is based on your [locale settings](doc:locale-settings). Right now, numbers are displayed with up to three decimal places. (In the future there will be a formatting setting for number of decimal places). # Currency --- Currency fields require a monetary value. You can specify the currency explicitly with a symbol like $ or €, or you just can enter a number and it will get the default currency configured on the field. Right now we support: * $ (Dollar) * £ (Pound) * € (Euro) * ₹ (Rupee) * ¥ (Yen) Currency values will also use decimal point or comma depending on your settings. Currency values display with either no decimal places (whole numbers) or exactly two decimal places, as needed. This will be a column setting in the future. When currency values are used in formulas, the result is usually a currency as well, e.g.: * $10 + $20 = $30 * £100 * 5 = £500 (However, adding different currencies is not recommended, as we don't currently calculate exchange rates.) # Percent --- Percent fields require a percentage value. These are just numeric values formatted in a different way. If you enter a number, a percent sign will be added automatically. When percent values are added, they result in another percent; however, a percent times a number or currency will lose the percent: * 10% + 20% = 30% * 50% * 30 = 15 * $100 * 5% = $5 # Date --- Date fields require a date. Dates can be input in a wide variety of formats, for example: * 10/21/2015 * 10/21 (defaults to current year) * October 21st, 2015 * Oct 21 2015 * 21 Oct 2015 * 2015-10-21 Etc. The first two examples above (with 10/21) assume month/day format, which is the default in the US. In other locales, day/month is the default (21/10). You can change this under your [locale settings](doc:locale-settings). **Tip:** In a Date column, you can even enter "today", "tomorrow" and "yesterday". Right now, no matter how dates are input, they are always displayed as numbers separated by slashes (6/6/2017). In the future there will be formatting options. Dates can be used in formulas as well: * "10/21/2015" + 7 = 10/28/2015 (add or subtract a number to calculate days before/after) * "10/21/2015" - "10/1/2015" = 20 (subtract two dates to get the number of days between) # Day of year --- Day-of-year fields represent a date independent of the year, such as an anniversary or a birthday. (The only way to get a day-of-year value is in a day-of-year column, since any day entered in a generic or date column will be interpreted as a date in the current year.) # Checkbox --- Checkbox fields contain a true/false (“Boolean”) value. They're good for yes/no or on/off status columns like “Done”, “Active” or “Paid”. [block:image] { "images": [ { "image": [ "https://files.readme.io/c29cc34-e0a809a-Screen_Shot_2017-01-25_at_9.18.59_PM.png", "e0a809a-Screen_Shot_2017-01-25_at_9.18.59_PM.png", 1288, 824, "#f8f8f7" ], "border": true } ] } [/block] You can use checkbox columns in [filters](doc:queries): [block:image] { "images": [ { "image": [ "https://files.readme.io/bb38a96-54a9d8d-Screen_Shot_2017-01-25_at_9.27.36_PM.png", "54a9d8d-Screen_Shot_2017-01-25_at_9.27.36_PM.png", 300, 75, "#f9f5f4" ], "border": true } ] } [/block] And in [formulas](doc:formulas): [block:image] { "images": [ { "image": [ "https://files.readme.io/34c813b-b64928a-Screen_Shot_2017-01-25_at_9.29.10_PM.png", "b64928a-Screen_Shot_2017-01-25_at_9.29.10_PM.png", 592, 155, "#2da334" ] } ] } [/block] # Pick list --- Pick list fields let you set a list of acceptable values. This is good for: * Status values: Red, Yellow, Green * Bucketing values: High, Medium, Low * Stages of a process: New, Working, Review, Done * Categories: Bug, Feature, Idea A pick list cell will have a dropdown with the items in it, in the order that you specify. You can also type values or type to filter a long list. Any value not on the list is an error. Right now you can only choose one value per cell. If you want to pick multiple values, use a [linked sheet](doc:linking-sheets). When you sort or group on a pick list column, it uses the order of the list (High, Medium, Low), not alphabetically (High, Low, Medium). When grouped on a pick list column, you can reorder the list by dragging the groups around. You can also edit the list directly when you set the field type. [block:image] { "images": [ { "image": [ "https://files.readme.io/94b5089-Screen_Shot_2017-02-12_at_10.33.33_PM.png", "Screen Shot 2017-02-12 at 10.33.33 PM.png", 551, 467, "#eeeef0" ], "border": true } ] } [/block] # Email and Website --- Email fields require that their input be in the format of an email (marty@example.com). Website fields are similar but require a link/URL (https://fieldbook.com). # Image and File --- Image and File fields let you upload attachments. Image fields will display the image inline: [block:image] { "images": [ { "image": [ "https://files.readme.io/307cd75-91hx9tlSSoIDJyiIkZAg_Screen_Shot_2016-01-30_at_3.52.17_PM.png", "91hx9tlSSoIDJyiIkZAg_Screen Shot 2016-01-30 at 3.52.17 PM.png", 461, 209, "#f6f5f5" ], "border": true } ] } [/block] File fields show the attachment with its filename: [block:image] { "images": [ { "image": [ "https://files.readme.io/c30f8b1-8f275bd-Screen_Shot_2017-01-24_at_4.17.13_PM.png", "8f275bd-Screen_Shot_2017-01-24_at_4.17.13_PM.png", 421, 174, "#f6f7f6" ], "border": true } ] } [/block] More about attachments: [Images and file attachments](doc:images-and-file-attachments) # Validation --- Any field with a type will validate its input. If you're typing into a cell, invalid input will not be allowed. [block:image] { "images": [ { "image": [ "https://files.readme.io/b9695c3-Screen_Shot_2017-02-12_at_10.37.51_PM.png", "Screen Shot 2017-02-12 at 10.37.51 PM.png", 391, 136, "#313131" ], "border": true } ] } [/block] Same filling out a [form](doc:forms): [block:image] { "images": [ { "image": [ "https://files.readme.io/3607f8f-Screen_Shot_2017-02-12_at_10.39.22_PM.png", "Screen Shot 2017-02-12 at 10.39.22 PM.png", 497, 242, "#fafafa" ], "border": true } ] } [/block] If you paste a block of text, it's possible that some of the input is valid and some is not. Invalid input will go into the sheet, but will be highlighted as a red error cell. (You can filter for errors in a column using the iserror() function.) [block:image] { "images": [ { "image": [ "https://files.readme.io/0361df7-Screen_Shot_2017-02-12_at_10.40.50_PM.png", "Screen Shot 2017-02-12 at 10.40.50 PM.png", 139, 201, "#f2ecec" ], "border": true } ] } [/block] In the API, invalid input is rejected with an HTTP 400 error code. # Changing field type --- You can set or change a field type at any time, even if it has data in it already. Fieldbook will do its best to convert the column to the new data type. (Any cells that can't be converted will be highlighted in red as error cells.)