@arcgis/coding-components 5.2.0-next.1 → 5.2.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/3QN6NREQ.js +2 -0
- package/dist/cdn/76VHPECE.js +2 -0
- package/dist/cdn/{QGBZYXBS.js → 7BIFZ5DU.js} +1 -1
- package/dist/cdn/7UTCJERR.js +2 -0
- package/dist/cdn/7Z6G332Z.js +2 -0
- package/dist/cdn/{O3PQD5N5.js → A6IGYBAZ.js} +2 -2
- package/dist/cdn/{QW7OA32G.js → B3RGPCZC.js} +1 -1
- package/dist/cdn/{CC4XBW6V.js → B73HLERI.js} +1 -1
- package/dist/cdn/BXC4G3AT.js +6 -0
- package/dist/cdn/{PUY5G6AF.js → CKBZZB5E.js} +1 -1
- package/dist/cdn/GTE3KXNK.js +2 -0
- package/dist/cdn/H2YYYWPE.js +2 -0
- package/dist/cdn/{3PBQ47BB.js → HXJFZ2Y5.js} +1 -1
- package/dist/cdn/{LZ2JU5WD.js → JLYAOSQM.js} +1 -1
- package/dist/cdn/{2DNHMHBF.js → LEFFI3FB.js} +1 -1
- package/dist/cdn/{IETP57KJ.js → MCVII2KK.js} +1 -1
- package/dist/cdn/{2WVAYBDV.js → MFDNJU3K.js} +1 -1
- package/dist/cdn/MZMKV7FA.js +2 -0
- package/dist/cdn/{LUJKYDO7.js → NCMXRX7O.js} +1 -1
- package/dist/cdn/NP37C536.js +2 -0
- package/dist/cdn/NVWQE3SF.js +2 -0
- package/dist/cdn/O6L3YJ7J.js +68 -0
- package/dist/cdn/{XU7YAUUX.js → PJBI5XFD.js} +1 -1
- package/dist/cdn/{QUR4WECO.js → PXKBNRBR.js} +1 -1
- package/dist/cdn/Q5RDW24Y.js +2 -0
- package/dist/cdn/{HRM2JUGO.js → RFQXYDLI.js} +1 -1
- package/dist/cdn/{WWVPYM5B.js → TIZLT4V3.js} +1 -1
- package/dist/cdn/UTTEHEMP.js +12 -0
- package/dist/cdn/VPVLZ5QO.js +2 -0
- package/dist/cdn/{BXEZA6TW.js → WRVJHPML.js} +1 -1
- package/dist/cdn/XJRNIBLO.js +2 -0
- package/dist/cdn/ZXEQOR2Y.js +2 -0
- package/dist/cdn/assets/arcade-language/api/arcade-api.t9n.en.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ar.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bg.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.bs.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ca.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.cs.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.da.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.de.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.el.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.es.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.et.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fi.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.fr.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.he.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hr.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.hu.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.id.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.it.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ja.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ko.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lt.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.lv.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.nl.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.no.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pl.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-BR.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.pt-PT.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ro.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.ru.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sk.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sl.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sr.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.sv.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.th.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.tr.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.uk.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.vi.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-CN.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-HK.json +1 -1
- package/dist/cdn/assets/arcade-language/profiles/arcade-profiles.t9n.zh-TW.json +1 -1
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2613 -2588
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +1 -1
- package/dist/chunks/arcade-defaults.js +56 -54
- package/dist/chunks/debugger-value-components.js +51 -47
- package/dist/chunks/debugger-value-styles.js +8 -8
- package/dist/chunks/fields.js +18 -14
- package/dist/chunks/functional.js +34 -34
- package/dist/chunks/language-defaults-base.js +230 -221
- package/dist/chunks/sql-expr-defaults.js +63 -59
- package/dist/components/arcgis-arcade-debugger-console/customElement.js +7 -7
- package/dist/components/arcgis-arcade-debugger-output/customElement.js +21 -18
- package/dist/components/arcgis-arcade-editor/customElement.d.ts +38 -3
- package/dist/components/arcgis-arcade-editor/customElement.js +185 -179
- package/dist/components/arcgis-arcade-results/customElement.js +18 -18
- package/dist/components/arcgis-code-editor-shell/customElement.js +70 -65
- package/dist/components/arcgis-editor-variables/customElement.js +12 -6
- package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +11 -0
- package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
- package/dist/components/arcgis-sql-layer-editor/customElement.js +10 -10
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/loader.js +3 -3
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +8 -8
- package/dist/cdn/3CHKFCKR.js +0 -2
- package/dist/cdn/3UD4JSPW.js +0 -2
- package/dist/cdn/4G3EYLJY.js +0 -2
- package/dist/cdn/4N67XYKO.js +0 -2
- package/dist/cdn/6QMGBWXM.js +0 -2
- package/dist/cdn/72E5GBWN.js +0 -68
- package/dist/cdn/B5A6XU2C.js +0 -2
- package/dist/cdn/CA3GVMWI.js +0 -2
- package/dist/cdn/CQTJWVFM.js +0 -6
- package/dist/cdn/G5IXPOCO.js +0 -2
- package/dist/cdn/P3LG4UGD.js +0 -2
- package/dist/cdn/RMVHO2AH.js +0 -12
- package/dist/cdn/RO6RHW6I.js +0 -2
- package/dist/cdn/TQDN6SR5.js +0 -2
- package/dist/cdn/TWEJITWD.js +0 -2
- package/dist/cdn/ZTCCL565.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"constants","title":"Constants","items":[{"type":"constant","name":"infinity","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#infinity","description":"Represents a value greater than any other number. `-Infinity` may also be used as a value smaller than any number.","examples":"\n**Example**\n\nCalculates the maximum of four field values\n\n```arcade\nvar values = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4 ];\nvar maxValue = -Infinity;\n\nfor(var i in values){\n maxValue = IIF(values[i] > maxValue, values[i], maxValue);\n}\n\nreturn maxValue;\n```\n\n","completion":{"label":"Infinity","detail":"Infinity","insertText":"Infinity","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRepresents a value greater than any other number. `-Infinity` may also be used as a value smaller than any number."}}},{"type":"constant","name":"nan","bundle":"core","sinceVersion":"1.36","link":"https://developers.arcgis.com/arcade/function-reference/constants/#nan","description":"Represents a value that is not a number (NaN).","examples":"","completion":{"label":"NaN","detail":"NaN","insertText":"NaN","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.36](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRepresents a value that is not a number (NaN)."}}},{"type":"constant","name":"pi","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#pi","description":"The value of a circle's circumference divided by its diameter, approximately `3.14159`.","examples":"\n**Example**\n\nReturns the area of a circle feature\n\n```arcade\nvar r = $feature.radius;\nPI * r * r;\n```\n\n","completion":{"label":"PI","detail":"PI","insertText":"PI","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe value of a circle's circumference divided by its diameter, approximately `3.14159`."}}},{"type":"constant","name":"textformatting.backwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.backwardslash","description":"Inserts a backslash character `\\` into the text.","examples":"\n**Example**\n\nReturns '\\\\\\serverName\\foo\\bar'\n\n```arcade\nTextFormatting.BackwardSlash + TextFormatting.BackwardSlash + $feature.FILE_PATH\n```\n\n","completion":{"label":"TextFormatting.BackwardSlash","detail":"TextFormatting.BackwardSlash","insertText":"TextFormatting.BackwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a backslash character `\\` into the text."}}},{"type":"constant","name":"textformatting.doublequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.doublequote","description":"Inserts a double quote character `\"` into the text.","examples":"\n**Example**\n\nReturns 'Nicholas \"Nick\" Anderson'\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.DoubleQuote + $feature.ALIAS + TextFormatting.DoubleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.DoubleQuote","detail":"TextFormatting.DoubleQuote","insertText":"TextFormatting.DoubleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a double quote character `\"` into the text."}}},{"type":"constant","name":"textformatting.forwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.forwardslash","description":"Inserts a forward slash character `/` into the text.","examples":"\n**Example**\n\nReturns '151/low'\n\n```arcade\n$feature.POP_DENSITY + TextFormatting.ForwardSlash + $feature.CLASS\n```\n\n","completion":{"label":"TextFormatting.ForwardSlash","detail":"TextFormatting.ForwardSlash","insertText":"TextFormatting.ForwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a forward slash character `/` into the text."}}},{"type":"constant","name":"textformatting.newline","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.newline","description":"Inserts a new line, or line break, into the text. Multi-line labels are **NOT** supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online Map Viewer Classic.","examples":"\n**Example**\n\nReturns \"T2N \nR1W\"\n\n```arcade\n\"T\" + $feature.TOWNSHIP + TextFormatting.NewLine + \"R\" + $feature.RANGE\n```\n\n","completion":{"label":"TextFormatting.NewLine","detail":"TextFormatting.NewLine","insertText":"TextFormatting.NewLine","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a new line, or line break, into the text. Multi-line labels are **NOT** supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online Map Viewer Classic."}}},{"type":"constant","name":"textformatting.singlequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.singlequote","description":"Inserts a single quote character `'` into the text.","examples":"\n**Example**\n\nReturns \"Nicholas 'Nick' Anderson\"\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.SingleQuote + $feature.ALIAS + TextFormatting.SingleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.SingleQuote","detail":"TextFormatting.SingleQuote","insertText":"TextFormatting.SingleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a single quote character `'` into the text."}}}]},{"id":"ai_functions","title":"AI functions","items":[{"type":"function","name":"translatetext","bundle":"ai","sinceVersion":"1.32","link":"https://developers.arcgis.com/arcade/function-reference/ai_functions/#translatetext","description":"_This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page. AI functions are currently not supported in ArcGIS Enterprise._\n\nTranslates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output.","examples":"\n**Example**\n\nTranslates the text 'Hello world' to the locale of the client or system.\n\n```arcade\nvar locale = GetEnvironment().locale;\nvar result = TranslateText('Hello world', locale);\n// result will be a dictionary with the translated text\nif (result.success){\n if(HasValue(result, [\"results\", 0, \"translation\"])){\n // returns \"Hola mundo\" if the device locale is 'es'\n return result.results[0].translation[locale];\n }\n if (HasValue(result, [\"results\", 0, \"text\"])){\n // returns \"Hello world\" if translation could not be performed\n return result.results[0].text;\n }\n}\nreturn \"Translation not successful\";\n```\n\n","completion":{"label":"TranslateText","detail":"TranslateText(inputText, toLanguages, fromLanguage?) -> Dictionary","insertText":"TranslateText(${1:inputText_}, ${2:toLanguages_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.32](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n_This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page. AI functions are currently not supported in ArcGIS Enterprise._\n\nTranslates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The text to translate. This can be a single text value or an array of text values.\n- **toLanguages**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The target language(s) to translate to. This can be a single language code or an array of language codes.\n- **fromLanguage** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The source language of the input text. If not specified, the service will attempt to auto-detect the source language.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nA dictionary containing the translated text.\n\n- **success**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether the translation was successful. This value will be `false` if the use of AI services is not allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page.\n- **results**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries containing the translation results for each `inputText` value.\n\n - **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The index of the input text in the original array.\n - **text**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input text that was translated.\n - **detectedLanguage**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The detected language of the input text, if applicable.\n\n - **language**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The language code of the detected language.\n - **score**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The confidence score of the detected language. Values range from 0 to 1, where 1 indicates high confidence. A value of `-1` indicates that the language was not detected.\n - **translation**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary of translated values where the key is the language code and the value is the translation.\n\n**Additional resources**\n\n* [Supported language codes](https://developers.arcgis.com/javascript/latest/localization/#locale-support)\n"}},"parametersInfo":{"min":2,"max":3}}]},{"id":"array_functions","title":"Array functions","items":[{"type":"function","name":"all","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#all","description":"Indicates whether all of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for all items in the input array.","examples":"\n**Examples**\n\nReturns `false` because some of the elements in the input array do not pass the `isEven` test\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 }\n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since some of the values in the array did not pass the test\n// (return true), the return value will be false\nAll([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if all of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAll(myArray, isEmpty)\n```\n\n","completion":{"label":"All","detail":"All(inputArray, testFunction) -> Boolean","insertText":"All(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether all of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for all items in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to test each element in the array `testFunction(value: Any) -> Boolean`. The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if the test function returns a truthy value for all the elements."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"any","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#any","description":"Tests whether any of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for at least one item in the input array.","examples":"\n**Examples**\n\nReturns `true` because at least one element in the input array passes the `isEven` test.\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be true\nAny([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if any of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAny(myArray, isEmpty)\n```\n\n","completion":{"label":"Any","detail":"Any(inputArray, testFunction) -> Boolean","insertText":"Any(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTests whether any of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for at least one item in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to test each element in the array `testFunction(value: Any) -> Boolean`. The The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if the test function returns a truthy value for any of the elements."}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"array","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array1","description":"Returns a new array of a given length.","examples":"\n**Examples**\n\nReturns `[null, null, null, null, null]`.\n\n```arcade\nArray(5)\n```\n\nReturns `[\"hello\",\"hello\"]`\n\n```arcade\nArray(2, \"hello\")\n```\n\nReturns `[1,1,1]`.\n\n```arcade\nArray(3, 1)\n```\n\n","completion":{"label":"Array","detail":"Array(arrayLength, defaultValue?) -> Array<Any>","insertText":"Array(${1:arrayLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a new array of a given length.\n\n**Parameters**\n\n- **arrayLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The desired length for the new array.\n- **defaultValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value for each element in the array. If no value is specified, the default will be `null`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"array","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array2","description":"Returns either a shallow or deep copy of an input array.","examples":"\n**Examples**\n\nCreates a shallow copy of the input array\n\n```arcade\nvar person1 = {\n firstName: \"Jane\",\n lastName: \"Doe\"\n};\nvar person2 = {\n firstName: \"John\",\n lastName: \"Smith\"\n};\nvar people = [ person1, person2 ];\n// create a shallow copy of the array\nvar copiedArray = Array(people);\npeople[0] == copiedArray[0];\n// returns true\n// this is a shallow copy of the array, so the elements share the same references\n```\n\nCreates a deep copy of the input array\n\n```arcade\nvar deepCopy = Array(people, true);\npeople[0] == deepCopy[0]\n// returns false\n// this is a deep copy of the array, so the elements do NOT share the same references\n```\n\n","completion":{"label":"Array","detail":"Array(inputArray, deep?) -> Array<Any>","insertText":"Array(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns either a shallow or deep copy of an input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be copied.\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - When `true`, creates a deep copy of each element in the input array, meaning elements in the output array will not share the same references as the elements of the input array. Default value is `false`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"back","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#back","description":"Returns the last element of an array. If the input array is empty, then the expression evaluation will fail.","examples":"\n**Example**\n\nReturns `'gray'`.\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nBack(colors)\n```\n\n","completion":{"label":"Back","detail":"Back(inputArray) -> Any","insertText":"Back(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the last element of an array. If the input array is empty, then the expression evaluation will fail.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to get the last value from.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#count","description":"Returns the number of items in an array.","examples":"\n**Example**\n\nReturns 6\n\n```arcade\nCount([12,21,32,44,58,63])\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of items in an array.\n\n**Parameter**\n\n- **value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue1","description":"Returns a specified default value if an index in an array does not exist or the value at the specified index is `null` or an empty text value.","examples":"\n**Examples**\n\nArray with value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 4, \"No data\");\n// returns 901\n```\n\nArray with no value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 5, \"No data\");\n// returns \"No data\"\n```\n\nArray with a null value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 2, \"No data\");\n// returns \"No data\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, index, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:index_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if an index in an array does not exist or the value at the specified index is `null` or an empty text value.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to check.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the index does not exist or the value at the specified index is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue2","description":"Checks whether an index nested several levels deep in a multidimensional array has a value and returns that value if present. Otherwise, this function returns a specified default value if at least one of the nested keys or indices does not exist or the value at the specified key or index is `null` or an empty text value. This allows you to drill into a nested structure in one step rather than check values within each array.","examples":"\n**Examples**\n\nArray with a value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 3], \"No data\");\n// returns 1\n```\n\nArray with no value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 10], \"No data\");\n// returns \"No data\"\n```\n\nArray with no value at the parent index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [10, 3], \"No data\");\n// returns \"No data\"\n```\n\nArray of dictionaries with nested values\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nvar a = [ data, data2, data3 ]\nDefaultValue(a, [0, \"weather\",\"precipitation\",\"values\", 6], \"No data\");\n// returns 1\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether an index nested several levels deep in a multidimensional array has a value and returns that value if present. Otherwise, this function returns a specified default value if at least one of the nested keys or indices does not exist or the value at the specified key or index is `null` or an empty text value. This allows you to drill into a nested structure in one step rather than check values within each array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct1","description":"Returns a set of distinct, or unique, values for an array of values.","examples":"\n**Example**\n\n```arcade\nDistinct([1,1,2,1,1,2,2,3,4,5])\n// Returns [1,2,3,4,5]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(values) -> Array<Any>","insertText":"Distinct(${1:values_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values for an array of values.\n\n**Parameter**\n\n- **values**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of values on which to perform the operation.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct2","description":"Returns a set of distinct, or unique, values for a list of values.","examples":"\n**Example**\n\n```arcade\nDistinct('high','medium','low',0,'high','high','low')\n// Returns ['high','medium','low',0]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct([value1, ..., valueN]?) -> Array<Any>","insertText":"Distinct($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values for a list of values.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A list of values on which to perform the operation.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"erase","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#erase","description":"Removes a value from an array at a given index. Existing elements positioned at or above the given index will shift down one index value. The array decreases in size by one.","examples":"\n**Examples**\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, 1)\n// colors = ['orange','gray']\n```\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, -1)\n// colors = ['orange','purple']\n```\n\n","completion":{"label":"Erase","detail":"Erase(inputArray, index) -> Null","insertText":"Erase(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves a value from an array at a given index. Existing elements positioned at or above the given index will shift down one index value. The array decreases in size by one.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to remove the value from.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the value to remove from the array. If a negative index is provided, it will be used as an offset from the end of the array.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filter","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#filter","description":"Creates a new array with the elements filtered from the input array that pass a test from the provided function.","examples":"\n**Examples**\n\nReturns a new array comprised of elements that passed the `isEven` filter.\n\n```arcade\nfunction isEven(i) { return i % 2 == 0 } \nFilter([1,2,3,4,5], isEven) // Returns [2,4]\n// Since 2 and 4 are even, they are the only values\n// included in the output array.\n```\n\nUses the existing `isEmpty` Arcade function in the `filterFunction`. Returns a new array of fields that are not empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\n\nfunction isNotEmpty(value){\n return !isEmpty(value);\n}\nFilter(myArray, isNotEmpty)\n// Returns only values that are defined,\n// excluding empty values from the result\n```\n\n","completion":{"label":"Filter","detail":"Filter(inputArray, filterFunction) -> Array<Any>","insertText":"Filter(${1:inputArray_}, ${2:filterFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new array with the elements filtered from the input array that pass a test from the provided function.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to filter.\n- **filterFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to filter elements in the array `filterFunction(value: Any) -> Boolean`. The function must return a truthy value if the element passes the test. This function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \nReturns an array with the elements that passe the test function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#first","description":"Returns the first element in an array. Returns `null` if the array is empty.","examples":"\n**Example**\n\nprints 'orange'\n\n```arcade\nFirst(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"First","detail":"First(inputArray) -> Any","insertText":"First(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first element in an array. Returns `null` if the array is empty.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array from which to return the first item.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"front","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#front","description":"Returns the first element of an array. If the input array is empty, then the expression evaluation will fail.","examples":"\n**Example**\n\nReturns `'orange'`.\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nFront(colors)\n```\n\n","completion":{"label":"Front","detail":"Front(inputArray) -> Any","insertText":"Front(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first element of an array. If the input array is empty, then the expression evaluation will fail.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array from which to get the first value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue1","description":"Indicates whether an array has a value at the given index.","examples":"\n**Examples**\n\nArray with value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 4);\n// returns true\n```\n\nArray with no value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 5);\n// returns false\n```\n\nArray with a null value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 2);\n// returns false\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, index) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether an array has a value at the given index.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to check.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue2","description":"Checks whether an index nested several levels deep in a multidimensional array has a value. This allows you to drill into a nested structure in one step rather than check values within each array. Returns `true` if the indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nArray with a value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 4]);\n// returns true\n```\n\nArray with no value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 10]);\n// returns false\n```\n\nArray with no value at the parent index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [10, 5]);\n// returns false\n```\n\nArray of dictionaries with nested values\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nvar a = [ data, data2, data3 ]\nif(HasValue(a, [0, \"weather\",\"precipitation\",\"values\", 6])){\n // This check succeeds so the value will be returned\n return a[0].weather.precipitation.values[6];\n // returns 1\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, indexes) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:indexes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether an index nested several levels deep in a multidimensional array has a value. This allows you to drill into a nested structure in one step rather than check values within each array. Returns `true` if the indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to check.\n- **indexes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"includes","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#includes","description":"Determines whether an array contains a given value. Returns `true` if the value is found within the array.","examples":"\n**Examples**\n\nReturns `true`.\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'purple')\n```\n\nReturns `false`.\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Includes","detail":"Includes(inputArray, value) -> Boolean","insertText":"Includes(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDetermines whether an array contains a given value. Returns `true` if the value is found within the array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to look for in the given array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"indexof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#indexof","description":"Returns the zero-based index location of the input item in an array. If `item` does not exist, then `-1` is returned.","examples":"\n**Example**\n\nprints 2\n\n```arcade\nvar num = [1,2,3,4];\nreturn indexof(num, 3);\n```\n\n","completion":{"label":"IndexOf","detail":"IndexOf(inputArray, item) -> Number","insertText":"IndexOf(${1:inputArray_}, ${2:item_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the zero-based index location of the input item in an array. If `item` does not exist, then `-1` is returned.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to search.\n- **item**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The item to locate in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"insert","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#insert","description":"Inserts a new value into an array at a given index. Existing elements positioned at or above the given index will shift up one index value. The array increases in size by one.","examples":"\n**Examples**\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, 1, 'yellow')\n// colors = ['orange','yellow','purple','gray']\n```\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, -1, 'yellow')\n// colors = ['orange','purple','yellow','gray']\n```\n\n","completion":{"label":"Insert","detail":"Insert(inputArray, index, value) -> Null","insertText":"Insert(${1:inputArray_}, ${2:index_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a new value into an array at a given index. Existing elements positioned at or above the given index will shift up one index value. The array increases in size by one.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to insert the new value into.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the array where the new value should be inserted. An index of 0 will insert the value at the beginning of the array. An index that equals the size of the array will insert the value at the end of the array. An index greater than the size of the array will cause an error. If a negative index is provided, it will be used as an offset from the end of the array.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to insert into the array.\n\n**Return value**: Null"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"map","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#map","description":"Creates a new array based on results of calling a provided function on each element in the input array.","examples":"\n**Examples**\n\nConverts all of the elements in the array from Fahrenheit to Celsius and returns them in a new array.\n\n```arcade\n// This function will take in values from the input array and convert them to Celsius\nfunction toCelsius(f) {\n return Round((f - 32) * 5/9, 2)\n}\n// The toCelsius function executes for each each item\n// in the input array.\n// Map returns the resulting array of converted values.\nMap([82, 67, 96, 55, 34], toCelsius)\n// returns [27.78, 19.44, 35.56, 12.78, 1.11]\n```\n\nConverts date objects to formatted text\n\n```arcade\nvar dates = [ Date(1996, 11, 10), Date(1995, 1, 6), Date(1992, 2, 27), Date(1990, 10, 2)];\nfunction formatDates(dateVal) { return Text(dateVal, 'MMM D, Y') }\nMap(dates, formatDates);\n// returns ['Dec 10, 1996', 'Feb 6, 1995', 'Mar 27, 1992', 'Nov 2, 1990']\n```\n\n","completion":{"label":"Map","detail":"Map(inputArray, mappingFunction) -> Array<Any>","insertText":"Map(${1:inputArray_}, ${2:mappingFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new array based on results of calling a provided function on each element in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to map.\n- **mappingFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function to call on each element in the array `mappingFunction(value: Any) -> Any`. The function must return a new item that will be part of the returned array. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \nThe items returned by the mapping function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"none","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#none","description":"Tests whether none of the elements in a given array pass a test from the provided function. Returns `true` if the `testFunction` returns `false` for all items in the input array.","examples":"\n**Examples**\n\nReturns `false` because some of the elements in the input array pass the `isEven` test\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be false\nNone([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if none of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nNone(myArray, isEmpty)\n```\n\n","completion":{"label":"None","detail":"None(inputArray, testFunction) -> Boolean","insertText":"None(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTests whether none of the elements in a given array pass a test from the provided function. Returns `true` if the `testFunction` returns `false` for all items in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function to test each element in the array `testFunction(value: Any) -> Boolean`. The function must return a falsy value if the element doesn't pass the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if all the elements in the array don't pass the test function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"pop","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#pop","description":"Removes and returns the element at the end of the array. If the array is empty, then an error is thrown.","examples":"\n**Example**\n\nReturns 'gray'. The input array will now equal `['orange', 'purple']`.\n\n```arcade\nPop(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Pop","detail":"Pop(inputArray) -> Any","insertText":"Pop(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves and returns the element at the end of the array. If the array is empty, then an error is thrown.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array from which the last element will be removed and returned.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"push","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#push","description":"Adds an element to the end of an array and returns the new length of the array.","examples":"\n**Example**\n\nReturns 4. The input array will now equal `['orange', 'purple', 'gray', 'red']`.\n\n```arcade\nPush(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Push","detail":"Push(inputArray, value) -> Number","insertText":"Push(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds an element to the end of an array and returns the new length of the array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to have elements pushed to.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to add as the last element of the input array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"reduce","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reduce","description":"Executes a provided \"reducer\" function on each element in the array, passing in the return value from the calculation of the previous element.","examples":"\n**Examples**\n\nWithout the `initialValue` parameter, the first two elements of the `cities` array are passed into the add function as arguments.\n\n```arcade\nvar cities = [{\n name: 'Columbus',\n pop: 913921\n}, {\n name: 'Cincinnati',\n pop: 307266\n}, {\n name: 'Dayton',\n pop: 140343\n}, {\n name: 'Cleveland',\n pop: 376599\n}];\n// the first time this function is called it will take the first two elements of the array as x and y\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nfunction mostPopulated(city1, city2) {\n IIf (city1.pop > city2.pop, city1, city2)\n}\nvar largestCity = Reduce(cities, mostPopulated)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Columbus is the biggest city in the list with a population of 913921\n```\n\nSince the `initialValue` parameter is set, that value will be the function's first argument (`city1`), and the first element of the `cities` will be the function's second argument (`city2`).\n\n```arcade\nvar los_angeles = { name: 'Los Angeles', pop: 3898747 }\n// since an initialValue is provided, it will be passed into the maxPop function as x\n// and the first value of the array will be passed in as y for the initial function call\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nvar largestCity = Reduce(cities, mostPopulated, los_angeles)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Los Angeles is the biggest city in the list with a population of 3898747\n```\n\n","completion":{"label":"Reduce","detail":"Reduce(inputArray, reducerFunction, initialValue?) -> Any","insertText":"Reduce(${1:inputArray_}, ${2:reducerFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nExecutes a provided \"reducer\" function on each element in the array, passing in the return value from the calculation of the previous element.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to reduce.\n- **reducerFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The reducer function that will aggregate the array values `reducerFunction(previousValue: Any, arrayValue: Any) -> Any`.\n\n - **previousValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first time the function executes, this will be the first element in the input array or the `initialValue`, if provided.\n - **arrayValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the current value of an element in the input array.\n- **initialValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An item to pass into the first argument of the reducer function.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nThe value that was assembled by the reducer function for each element in the array."}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"resize","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#resize","description":"Changes the number of elements in an array to the specified size. It can be used to expand the array or truncate it early. After resizing, attempting to index beyond the new last element will result in an error, except for the case of indexing the next element, which will continue to expand the array by one element.","examples":"\n**Examples**\n\nReturns `['orange', 'purple', 'gray', null, null]`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5)\nreturn colors\n```\n\nReturns `['orange', 'purple', 'gray', 'red', 'red']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5, 'red')\nreturn colors\n```\n\nReturns `['orange']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 1)\nreturn colors\n```\n\n","completion":{"label":"Resize","detail":"Resize(inputArray, newSize, value?) -> Null","insertText":"Resize(${1:inputArray_}, ${2:newSize_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChanges the number of elements in an array to the specified size. It can be used to expand the array or truncate it early. After resizing, attempting to index beyond the new last element will result in an error, except for the case of indexing the next element, which will continue to expand the array by one element.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be resized.\n- **newSize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of elements desired in the resized array.\n- **value** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The optional value that will be used for any new elements added to the array. If no value is specified, the newly added elements will have a `null` value.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"reverse","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reverse","description":"Reverses the contents of the array in place.","examples":"\n**Example**\n\nReturns `['gray', 'purple', 'orange']`\n\n```arcade\nReverse(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Reverse","detail":"Reverse(inputArray) -> Array<Any>","insertText":"Reverse(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReverses the contents of the array in place.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be reversed.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"slice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#slice","description":"Returns a portion of an array between two indexes as a new array.","examples":"\n**Examples**\n\nReturns `['purple', 'gray']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 1, 3)\n```\n\nReturns `['red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 3)\n```\n\nReturns `['orange', 'purple', 'gray', 'red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'])\n```\n\nReturns `['blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], -1)\n```\n\n","completion":{"label":"Slice","detail":"Slice(inputArray, startIndex?, endIndex?) -> Array<Any>","insertText":"Slice(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a portion of an array between two indexes as a new array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be sliced.\n- **startIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index from which to start the slice. Defaults to `0`. If a negative index is provided, it will be used as an offset from the end of the array.\n- **endIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index where the slice will end. The value at this index will not be included in the returned array. Defaults to the array size.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"sort","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#sort","description":"Sorts an array by ASCII value. If all the items in the array are the same type, an appropriate sort function will be used. If they are different types, the items will be converted to text. If the array contains dictionaries, and no user defined function is provided, no sort will happen. If the array contains `null` values, they will not be converted to text and will be returned at the end of the sorted array. `NaN` values will be sorted after all numeric values (including `Infinity`), but before all other values.","examples":"\n**Examples**\n\nreturns `['$', 1, 'A', 'a']`\n\n```arcade\nSort([1, 'a', '$', 'A'])\n```\n\nSort using a user defined function\n\n```arcade\nvar peopleArray = [{ 'NAME': 'Sam', 'AGE': 25 }, {'NAME': 'Bob', 'AGE': 27 },{ 'NAME': 'Emma', 'AGE': 24 }];\nfunction compareAge(a,b){\n if (a['AGE']<b['AGE'])\n return -1;\n if (a['AGE']>b['AGE'])\n return 1;\n return 0;\n}\nreturn Sort(peopleArray, compareAge);\n// returns '[{ 'AGE': 24, 'NAME': 'Emma' }, { 'AGE': 25, 'NAME': 'Sam' }, { 'AGE': 27, 'NAME': 'Bob' } ]'\n```\n\n","completion":{"label":"Sort","detail":"Sort(inputArray, comparatorFunction?) -> Array<Any>","insertText":"Sort(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSorts an array by ASCII value. If all the items in the array are the same type, an appropriate sort function will be used. If they are different types, the items will be converted to text. If the array contains dictionaries, and no user defined function is provided, no sort will happen. If the array contains `null` values, they will not be converted to text and will be returned at the end of the sorted array. `NaN` values will be sorted after all numeric values (including `Infinity`), but before all other values.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to sort.\n- **comparatorFunction** (_Optional_): [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - A user defined function to be used for the sort `orderingFunction(a: Any, b: Any) -> Number`. The function receives two elements and should return a number that indicates the sorting order of the two elements: \n`> 0`: sort `b` before `a` \n`= 0`: keep the original order of `a` and `b` \n`< 0`: sort `a` before `b`\n\n - **a**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first element for comparison.\n - **b**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The second element for comparison.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"splice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#splice","description":"Concatenates all parameters together into a new array.","examples":"\n**Examples**\n\nReturns `['orange', 'purple', 1, 2, 'red']`\n\n```arcade\nSplice(['orange', 'purple'], 1, 2, 'red')\n```\n\nReturns `[1, 2, 3, 4]`\n\n```arcade\nSplice([1,2], [3,4])\n```\n\n","completion":{"label":"Splice","detail":"Splice([value1, ..., valueN]?) -> Array<Any>","insertText":"Splice($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConcatenates all parameters together into a new array.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An ongoing list of values to be spliced into a new array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"top","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#top","description":"Truncates the input array and returns the first given number of elements.","examples":"\n**Example**\n\nreturns `[ 43,32,19 ]`\n\n```arcade\nTop([ 43,32,19,0,3,55 ], 3)\n```\n\n","completion":{"label":"Top","detail":"Top(inputArray, numItems) -> Array<Any>","insertText":"Top(${1:inputArray_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTruncates the input array and returns the first given number of elements.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to truncate.\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of items to return from the beginning of the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"date_functions","title":"Date functions","items":[{"type":"function","name":"changetimezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone","description":"Changes the time zone used to display the given Date value. If the input `dateValue` has an `unknown` time zone, then the output Date value will display with the same date and time as the input `dateValue`, but will be assigned the `newTimeZone`.","examples":"\n**Examples**\n\nChanges the given Date's time zone from `America/New_York` to `America/Los_Angeles`\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"America/New_York\")\nChangeTimeZone(inputDate, \"America/Los_Angeles\");\n// returns a Date representing Nov 11, 2011, 5:00:00 AM PST\n```\n\nAssigns a Date with an `unknown` time zone to a time offset of `+07:00`\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"unknown\")\nChangeTimeZone(inputDate, \"+07:00\");\n// returns a Date representing Nov 11, 2011, 8:00:00 AM +07:00\n```\n\n","completion":{"label":"ChangeTimeZone","detail":"ChangeTimeZone(dateValue, newTimeZone) -> Date","insertText":"ChangeTimeZone(${1:dateValue_}, ${2:newTimeZone_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChanges the time zone used to display the given Date value. If the input `dateValue` has an `unknown` time zone, then the output Date value will display with the same date and time as the input `dateValue`, but will be assigned the `newTimeZone`.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value containing date and time information.\n- **newTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The new time zone that will be used to display the given Date value. The time zone must be one of the following:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [ToLocal()](https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal)\n* [ToUTC()](https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date1","description":"Creates a Date object from a set of parameters. By default, Dates are created in the time zone of the profile's execution context.","examples":"\n**Examples**\n\nCreates a Date representing the given time in the time zone of the profile's execution context running Arcade\n\n```arcade\n// Date that represents Jun 02, 1987, 12:00:00 AM PST\nDate(1987,05,02)\n```\n\nCreates a Date with time defined in a specific time zone\n\n```arcade\nDate(1990, 10, 2, 2, 23, 0, 0, \"America/New_York\");\n // Date represents Nov 2, 1990, 2:23:00 AM EST\n```\n\n","completion":{"label":"Date","detail":"Date(year, month, day, hour?, minute?, second?, millisecond?, timeZone?) -> Date","insertText":"Date(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date object from a set of parameters. By default, Dates are created in the time zone of the profile's execution context.\n\n**Parameters**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing a year.\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The month (0-11) where `0` is January and `11` is December.\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The day of the month (1-31).\n- **hour** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The hour of the day (0-23).\n- **minute** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The minute of the hour (0-59).\n- **second** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The second of the minute (0-59).\n- **millisecond** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The millisecond of the second (0-999).\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.24_ The time zone of the Date. If not specified, the Date will be created in the default time zone of the profile's execution context. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":3,"max":8}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date2","description":"Creates a Date with the given Unix epoch number. By default, the Date will display in the time zone of the profile's execution context. If no epoch is provided, creates a Date at the current date and time in the default time zone of the profile. If a `null` value is provided for the epoch, it will be implicitly cast to `0` and will return the date for January 1, 1970 UTC.","examples":"\n**Examples**\n\nMilliseconds since January 1, 1970\n\n```arcade\nDate(1476987783555) // 'Thu Oct 20 2016 11:23:03 GMT-0700 (PDT)'\n```\n\nCreates a Date representing the current time in the time zone of the profile's execution context running Arcade\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nDate()\n```\n\n","completion":{"label":"Date","detail":"Date(epoch?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date with the given Unix epoch number. By default, the Date will display in the time zone of the profile's execution context. If no epoch is provided, creates a Date at the current date and time in the default time zone of the profile. If a `null` value is provided for the epoch, it will be implicitly cast to `0` and will return the date for January 1, 1970 UTC.\n\n**Parameter**\n\n- **epoch** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since January 1, 1970 UTC.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date3","description":"Creates a Date value from an ISO 8601 text value. If a UTC offset is provided, the date will still be displayed in the time zone of the profile. If no text value is provided, creates a date at the current date and time in the time zone of the profile.","examples":"\n**Examples**\n\nCreates a Date from an ISO 8601 text value with a known time offset\n\n```arcade\nDate('2016-10-20T17:41:37+00:00') // 'Thu Oct 20 2016 10:41:37 GMT-0700 (PDT)'\n```\n\nCreates a Date from an ISO 8601 text value with an unknown time offset\n\n```arcade\nDate('2016-10-20T17:41:37') // 'Thu Oct 20 2016 5:41:37 PM PDT'\n```\n\n","completion":{"label":"Date","detail":"Date(timestamp?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value from an ISO 8601 text value. If a UTC offset is provided, the date will still be displayed in the time zone of the profile. If no text value is provided, creates a date at the current date and time in the time zone of the profile.\n\n**Parameter**\n\n- **timestamp** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ISO 8601 text value to be converted into a Date.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date4","description":"Creates a Date from a DateOnly value, with an optional Time and time zone value.","examples":"\n**Example**\n\nCreates a Date from a DateOnly and time type\n\n```arcade\nDate(DateOnly(2022,10,11), Time(\"11:20 am\"))\n// returns a Date representing Nov 11, 2022, 11:20:00 AM in an unknown time zone\n```\n\n","completion":{"label":"Date","detail":"Date(dateOnlyValue, timeValue?, timeZone?) -> Date","insertText":"Date(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date from a DateOnly value, with an optional Time and time zone value.\n\n**Parameters**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value from which to create a Date value.\n- **timeValue** (_Optional_): [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value for the Date. If not specified, the Date will be created with a time of `00:00:00`.\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The time zone of the Date. If not specified, the Date will be created in the `unknown` time zone. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date5","description":"Creates a copy of the given Date.","examples":"\n**Example**\n\nCreates a copy of the current Date value\n\n```arcade\nvar copiedDate = Date(Now())\n```\n\n","completion":{"label":"Date","detail":"Date(dateValue) -> Date","insertText":"Date(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date to copy.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd1","description":"Adds a specified amount of time in the given units to a Date and returns a new Date. If the Date has an IANA time zone, then daylight saving and other time zone driven logic will apply.","examples":"\n**Example**\n\nAdds 7 days to the given Date\n\n```arcade\nvar startDate = Date(2023, 9, 1, 12, 00);\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns a Date representing Oct 8, 2023, 12:00:00 PM PDT\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateValue, addValue, units?) -> Date","insertText":"DateAdd(${1:dateValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a Date and returns a new Date. If the Date has an IANA time zone, then daylight saving and other time zone driven logic will apply.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The input Date to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the Date in the given units.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the Date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd2","description":"Adds a specified amount of time in the given units to a DateOnly value and returns a new DateOnly value.","examples":"\n**Examples**\n\nAdds 7 days to the Date in the provided field\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns 2023-06-11\n```\n\nAdds 12 hours to the Date in the provided field\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar hoursLater = DateAdd(startDate, 12, 'hours');\nreturn hoursLater;\n// returns the original start date, 2023-06-04\n// since 12 hours < 1 day, the DateOnly input is not changed\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateOnlyValue, addValue, units?) -> DateOnly","insertText":"DateAdd(${1:dateOnlyValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a DateOnly value and returns a new DateOnly value.\n\n**Parameters**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The input DateOnly value to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the date in the given units. For DateOnly inputs, this value will be rounded down to the nearest day based on a 24-hour interval. If the value to be added is less than 24 hours, then no value will be added to the DateOnly input.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd3","description":"Adds a specified amount of time in the given units to a Time value and returns a new Time value.","examples":"\n**Examples**\n\nAdds 7 hours to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 7, 'hours');\nreturn hoursLater;\n// returns 18:30:00\n```\n\nAdds 90 seconds to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar secondsLater = DateAdd(startTime, 90, \"seconds\");\nreturn secondsLater;\n// returns 11:31:30\n```\n\nAdds 25 hours to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 25, 'hours');\nreturn hoursLater;\n// returns 12:30:00\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(timeValue, addValue, units?) -> Time","insertText":"DateAdd(${1:timeValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a Time value and returns a new Time value.\n\n**Parameters**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The input Time value to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the time in the given units.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff1","description":"Subtracts two Dates, and returns the difference in the specified units.","examples":"\n**Examples**\n\nSubtracts two Dates and returns the age\n\n```arcade\nvar startDate = Date($feature.startDateField);\nvar endDate = Date($feature.endDateField);\nvar age = DateDiff(endDate, startDate, 'years');\nreturn age;\n```\n\nSubtracts two Dates and returns the difference.\n\n```arcade\nvar startDate = Date(2022,2,23,2,23,22,0, \"America/New_York\"); // Mar 23, 2022, 2:23:22 AM EDT\nvar endDate = Date(2022,2,23,5,23,22,0, \"unknown\"); // Mar 23, 2022, 5:23:22 AM\n\nDateDiff(endDate, startDate, 'hours')\n// returns 3, since the Date with an unknown time zone is assumed to be New York time before the difference is calculated\n\nDateDiff(endDate, startDate, 'hours', \"America/Los_Angeles\");\n// returns 6, since the Date with an unknown time zone is now considered to be Los Angeles time before the difference is calculated\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(date1, date2, units?, timeZone?) -> Number","insertText":"DateDiff(${1:date1_}, ${2:date2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two Dates, and returns the difference in the specified units.\n\n**Parameters**\n\n- **date1**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date value from which to subtract a second Date.\n- **date2**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date value to subtract from the first given Date.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given Dates. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. The default value is `milliseconds`.\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since version 1.24_ The time zone to assign to input Dates with an unknown time zone. If not specified, then the following will happen: (1) If one input has a defined time zone and the other is unknown, then the value with the unknown time zone will assume a time zone that matches the other input. (2) If both inputs are unknown time zones, then the DateDiff will be calculated on both Dates as if they were defined in the same time zone. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff2","description":"Subtracts two DateOnly values, and returns the difference in the specified units.","examples":"\n**Example**\n\nSubtracts two DateOnly values and returns the difference in years\n\n```arcade\nvar startDate = DateOnly(1996,11,10);\nvar endDate = DateOnly(); // today's date\nvar age = DateDiff(endDate, startDate, 'years');\nFloor(age); // round down\n// returns 26\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(dateOnly1, dateOnly2, units?) -> Number","insertText":"DateDiff(${1:dateOnly1_}, ${2:dateOnly2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two DateOnly values, and returns the difference in the specified units.\n\n**Parameters**\n\n- **dateOnly1**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value from which to subtract a second DateOnly value.\n- **dateOnly2**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value to subtract from the first given DateOnly value.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given DateOnly values. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. The default value is `milliseconds`.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff3","description":"Subtracts two Time values, and returns the difference in the specified units.","examples":"\n**Example**\n\nSubtracts two Time values and returns the difference in hours\n\n```arcade\nDateDiff(Time(23,0), Time(9,0), 'hours')\n// returns 14\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(time1, time2, units?) -> Number","insertText":"DateDiff(${1:time1_}, ${2:time2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two Time values, and returns the difference in the specified units.\n\n**Parameters**\n\n- **time1**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value from which to subtract a second Time value.\n- **time2**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value to subtract from the first given Time value.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given Time values. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`. The default value is `milliseconds`.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly1","description":"Creates a DateOnly value based on the current date in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current DateOnly (no time)\n\n```arcade\nDateOnly()\n// returns the current date, i.e. 2023-09-12\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly() -> DateOnly","insertText":"DateOnly($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value based on the current date in the time zone of the profile's execution context.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly2","description":"Creates a DateOnly value from inputs representing the year, month, and day.","examples":"\n**Example**\n\nCreates a DateOnly value from inputs representing the year, month, and day\n\n```arcade\nDateOnly(1996, 11, 10)\n// returns 1996-12-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(year, month, day) -> DateOnly","insertText":"DateOnly(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from inputs representing the year, month, and day.\n\n**Parameters**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing a year.\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The month (0-11) where `0` is January and `11` is December. If this value falls outside the normal range (0-11), the function will return `null`.\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The day of the month (1-31). If this value falls outside the normal range (1-31), the function will return `null`.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly3","description":"Creates a DateOnly date with the given Unix epoch number.","examples":"\n**Example**\n\nReturns the DateOnly from the number of milliseconds since January 1, 1970\n\n```arcade\nDateOnly(1476987783555);\n// returns 2016-10-20\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(epoch) -> DateOnly","insertText":"DateOnly(${1:epoch_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly date with the given Unix epoch number.\n\n**Parameter**\n\n- **epoch**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since January 1, 1970 UTC.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly4","description":"Creates a DateOnly value from a text input representing an ISO formatted date, or another formatted text pattern.","examples":"\n**Examples**\n\nCreates a DateOnly value from a text value representing the date\n\n```arcade\nDateOnly(\"2023-05-11T13:43:18.990+01:00\");\n// returns 2023-05-11\n```\n\nCreates a DateOnly value from a text value representing the date in the given format\n\n```arcade\nDateOnly(\"10 Jan 2022\",\"D MMM Y\")\n// returns 2022-01-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(textValue, format?) -> DateOnly","insertText":"DateOnly(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from a text input representing an ISO formatted date, or another formatted text pattern.\n\n**Parameters**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value representing a date. This should either be an ISO formatted date or another formatted text representing a date. If this value does not follow ISO format, the `format` parameter must be defined indicating the date's format.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value indicating the format of the `dateValue` input. \nPossible values: \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly5","description":"Creates a DateOnly value from a given date.","examples":"\n**Example**\n\nReturns the DateOnly from the given date\n\n```arcade\nDateOnly(Date(2008,10,11,10,30));\n// returns 2008-11-11\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateValue) -> DateOnly","insertText":"DateOnly(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from a given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The date from which to create the DateOnly value.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly6","description":"Creates a copy of a DateOnly value.","examples":"\n**Example**\n\nCreates a copy of DateOnly value\n\n```arcade\nvar originalDateOnly = DateOnly(1996,11,10)\nvar copiedDateOnly = DateOnly(originalDateOnly)\nreturn copiedDateOnly;\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateOnlyValue) -> DateOnly","insertText":"DateOnly(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a DateOnly value.\n\n**Parameter**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value to copy.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"day","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#day","description":"Returns the day of the month of the given date.","examples":"\n**Examples**\n\nGets the day of the month of the current date\n\n```arcade\nDay(Now())\n```\n\nReturns the day of the month from a DateOnly value\n\n```arcade\nDay(DateOnly(1996, 11, 10))\n// returns 10\n```\n\n","completion":{"label":"Day","detail":"Day(dateValue) -> Number","insertText":"Day(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the month of the given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the day of the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hour","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#hour1","description":"Returns the hour of the time in the given Date or Time value (0-23).","examples":"\n**Examples**\n\nReturns the hour of the current time\n\n```arcade\nHour(Now())\n```\n\nReturns the hour of the time\n\n```arcade\nHour(Date(2023, 1, 1, 12, 59, 23))\n// returns 12\n```\n\nReturns the hour of the time\n\n```arcade\nHour(Time(2, 59, 23))\n// returns 2\n```\n\n","completion":{"label":"Hour","detail":"Hour(dateTimeValue) -> Number","insertText":"Hour(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the hour of the time in the given Date or Time value (0-23).\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the hour of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"isomonth","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth","description":"Returns the month of the given date, based on the ISO 8601 standard. Values range from 1-12 where January is `1` and December is `12`.","examples":"\n**Examples**\n\nGets the month of the given date, based on the ISO 8601 standard. Returns `12`, for the month of December.\n\n```arcade\nISOMonth(Date(1980, 11, 31))\n```\n\nGets the month of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOMonth(DateOnly(1996, 0, 10))\n// returns 1, for January\n```\n\n","completion":{"label":"ISOMonth","detail":"ISOMonth(dateValue) -> Number","insertText":"ISOMonth(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the month of the given date, based on the ISO 8601 standard. Values range from 1-12 where January is `1` and December is `12`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweek","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweek","description":"Returns the week in the year of the given date, based on the ISO 8601 week date calendar. Values range from 1-53 where the first week of the year is `1` and the last week of the year is `52` or `53`, depending on the year.","examples":"\n**Examples**\n\nGets the week of the given date, based on the ISO 8601 standard. Returns `1`, since this date is included in the first week of the following year.\n\n```arcade\nISOWeek(Date(1980, 11, 31))\n```\n\nGets the week of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOWeek(DateOnly(1996, 11, 10))\n// returns 50\n```\n\n","completion":{"label":"ISOWeek","detail":"ISOWeek(dateValue) -> Number","insertText":"ISOWeek(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the week in the year of the given date, based on the ISO 8601 week date calendar. Values range from 1-53 where the first week of the year is `1` and the last week of the year is `52` or `53`, depending on the year.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweekday","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweekday","description":"Returns the day of the week of the given date, based on the ISO 8601 standard. Values range from 1-7 where Monday is `1` and Sunday is `7`.","examples":"\n**Examples**\n\nReturns the day of the week of the given date, based on the ISO 8601 standard. Returns `3`, for Wednesday.\n\n```arcade\nISOWeekday(Date(1980, 11, 31))\n```\n\nReturns the day of the week of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"ISOWeekday","detail":"ISOWeekday(dateValue) -> Number","insertText":"ISOWeekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the week of the given date, based on the ISO 8601 standard. Values range from 1-7 where Monday is `1` and Sunday is `7`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to return the day of the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoyear","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoyear","description":"Returns the year of the given date based on the ISO 8601 week date calendar.","examples":"\n**Examples**\n\nGets the year of the given date, based on the ISO 8601 week date calendar. Returns `1981`, since this date is included in the first week of the following year.\n\n```arcade\nISOYear(Date(1980, 11, 31))\n```\n\nGets the year of the given DateOnly value, based on the ISO 8601 week date calendar.\n\n```arcade\nISOYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"ISOYear","detail":"ISOYear(dateValue) -> Number","insertText":"ISOYear(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the year of the given date based on the ISO 8601 week date calendar.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the year. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"millisecond","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#millisecond1","description":"Returns the millisecond of the time in the given Time or Date value.","examples":"\n**Examples**\n\nReturns the millisecond of the current time\n\n```arcade\nMillisecond(Now())\n```\n\nReturns the millisecond of the time\n\n```arcade\nMillisecond(Date(2023, 1, 1, 12, 59, 23, 999))\n// returns 999\n```\n\nReturns the millisecond of the time\n\n```arcade\nMillisecond(Time(2, 59, 23, 450))\n// returns 450\n```\n\n","completion":{"label":"Millisecond","detail":"Millisecond(dateTimeValue) -> Number","insertText":"Millisecond(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the millisecond of the time in the given Time or Date value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the millisecond of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"minute","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#minute1","description":"Returns the minute of the time in the given Time or Date value.","examples":"\n**Examples**\n\nReturns the minute of the current time\n\n```arcade\nMinute(Now())\n```\n\nReturns the minute of the time\n\n```arcade\nMinute(Date(2013, 1, 1, 2, 15, 23))\n// returns 15\n```\n\nReturns the minute of the time\n\n```arcade\nMinute(Time(2, 59, 23))\n// returns 59\n```\n\n","completion":{"label":"Minute","detail":"Minute(dateTimeValue) -> Number","insertText":"Minute(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the minute of the time in the given Time or Date value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the minute of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"month","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#month","description":"Returns the month of the given date. Values range from 0-11 where January is `0` and December is `11`.","examples":"\n**Examples**\n\nGets the month of the given Date. Value can be between 0-11, where `0` represents January and `11` represents December.\n\n```arcade\nMonth(Date(1980, 11, 31))\n// returns 11\n```\n\nGets the month of the given DateOnly value.\n\n```arcade\nMonth(DateOnly(1996, 0, 31))\n// returns 0, for the month of January\n```\n\n","completion":{"label":"Month","detail":"Month(dateValue) -> Number","insertText":"Month(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the month of the given date. Values range from 0-11 where January is `0` and December is `11`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [ISOMonth()](https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"now","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#now","description":"Creates a Date value representing the current date and time in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current date and time in the profile's default time zone\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n```\n\n","completion":{"label":"Now","detail":"Now() -> Date","insertText":"Now($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value representing the current date and time in the time zone of the profile's execution context.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},[{"type":"function","name":"second","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#second1","description":"Returns the second of the time in the given Date or Time value.","examples":"\n**Examples**\n\nGets the second of the current time\n\n```arcade\nSecond(Now())\n```\n\nGets the second of the time\n\n```arcade\nSecond(Date(2023, 1, 1, 2, 59, 01))\n// returns 1\n```\n\nGets the second of the time\n\n```arcade\nSecond(Time(2, 59, 23))\n// returns 23\n```\n\n","completion":{"label":"Second","detail":"Second(dateTimeValue) -> Number","insertText":"Second(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the second of the time in the given Date or Time value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the second of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time1","description":"Creates a Time value representing the current time in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current time displayed using the profile's default time zone\n\n```arcade\n// Time represents 12:41:20 PM\nTime()\n```\n\n","completion":{"label":"Time","detail":"Time() -> Time","insertText":"Time($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value representing the current time in the time zone of the profile's execution context.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time2","description":"Creates a Time value from inputs representing hours, minutes, seconds, and milliseconds.","examples":"\n**Example**\n\nCreates a Time value from inputs representing hours, minutes, seconds, and milliseconds\n\n```arcade\nTime(13, 20);\n// returns a Time value of 13:20:00\n \nTime(2, 59, 23)\n// returns a Time value of 02:59:23\n \nTime(15, 47, 0, 474)\n// returns a Time value of 15:47:00.474\n```\n\n","completion":{"label":"Time","detail":"Time(hours, minutes, seconds?, milliseconds?) -> Time","insertText":"Time(${1:hours_}, ${2:minutes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from inputs representing hours, minutes, seconds, and milliseconds.\n\n**Parameters**\n\n- **hours**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing hours of the Time value (0-23). If this value falls outside the normal range (0-23), the function will return `null`.\n- **minutes**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the minutes of the Time value (0-59). If this value falls outside the normal range (0-59), the function will return `null`.\n- **seconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the seconds of the Time value (0-59). If this value falls outside the normal range (0-59), the function will return `null`.\n- **milliseconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the milliseconds of the Time value (0-999). If this value falls outside the normal range (0-999), the function will return `null`.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time3","description":"Creates a Time value from a given number representing milliseconds since midnight.","examples":"\n**Examples**\n\nReturns the Time from the number of milliseconds since midnight\n\n```arcade\nTime(8119800);\n// returns a Time value of 02:15:19.800\n```\n\nReturns the Time from the number of milliseconds since midnight\n\n```arcade\nTime(86400001);\n// returns null - the input value exceeds the number of milliseconds in a day\n```\n\n","completion":{"label":"Time","detail":"Time(numValue) -> Time","insertText":"Time(${1:numValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a given number representing milliseconds since midnight.\n\n**Parameter**\n\n- **numValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since midnight. If this value is larger than 86,400,000 (the maximum number of milliseconds in a day) or less than 0, the function will return `null`.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time4","description":"Creates a Time value from a text input representing time, with an optional input indicating the text's format.","examples":"\n**Examples**\n\nCreates a Time value from a text value representing the time\n\n```arcade\nTime(\"1:20 PM\");\n// returns a Time value of 13:20:00\n```\n\nCreates a Time value from a text value representing the time and formatting\n\n```arcade\nTime(\"12 05 04\", \"HH MM ss\")\n// returns a Time value of 12:05:04\n```\n\n","completion":{"label":"Time","detail":"Time(textValue, format?) -> Time","insertText":"Time(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a text input representing time, with an optional input indicating the text's format.\n\n**Parameters**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value representing a time.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value indicating the format of the `timeValue` input. \nPossible values: \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `A`: AM/PM \n\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time5","description":"Creates a Time value from a given date.","examples":"\n**Example**\n\nReturns the Time from the given date\n\n```arcade\nTime(Date(2008,10,11,10,30));\n// returns a Time value of 10:30:00 AM\n```\n\n","completion":{"label":"Time","detail":"Time(dateValue) -> Time","insertText":"Time(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The date from which to get the time.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time6","description":"Creates a copy of a Time value.","examples":"\n**Example**\n\nCreates a copy of Time value\n\n```arcade\nvar originalTime = Time(23,32,00)\nvar copiedTime = Time(originalTime)\nreturn copiedTime;\n```\n\n","completion":{"label":"Time","detail":"Time(timeValue) -> Time","insertText":"Time(${1:timeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a Time value.\n\n**Parameter**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value to copy.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"timestamp","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp","description":"Creates a Date value representing the current date and time in UTC.","examples":"\n**Example**\n\nCreates a Date in UTC time\n\n```arcade\n// Date that represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n```\n\n","completion":{"label":"Timestamp","detail":"Timestamp() -> Date","insertText":"Timestamp($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value representing the current date and time in UTC.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"timezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezone","description":"Returns the time zone of the given Date. The time zone will be one of the following:\n\n- text representing an entry in the IANA time zone database (i.e. `America/New_York`)\n\n- text representing the hours and minutes that should be added to UTC (i.e. `+07:00` or `-03:00`)\n\n- `system` - time zone will be based on the client or system's local time zone\n\n- `UTC` - Coordinated Universal Time\n\n- `Unknown` - time zone information is not defined.","examples":"\n**Example**\n\nReturns the time zone of a Date\n\n```arcade\nvar natlPizzaDay = Date(2024, 1, 9, 0, 0, 0, 0, \"America/Los_Angeles\");\nTimeZone(natlPizzaDay);\n// Returns 'America/Los_Angeles'\n```\n\n","completion":{"label":"TimeZone","detail":"TimeZone(dateValue) -> Text","insertText":"TimeZone(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time zone of the given Date. The time zone will be one of the following:\n\n- text representing an entry in the IANA time zone database (i.e. `America/New_York`)\n\n- text representing the hours and minutes that should be added to UTC (i.e. `+07:00` or `-03:00`)\n\n- `system` - time zone will be based on the client or system's local time zone\n\n- `UTC` - Coordinated Universal Time\n\n- `Unknown` - time zone information is not defined.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value from which to get the time zone.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"timezoneoffset","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezoneoffset","description":"Returns the time zone offset in milliseconds from UTC for the given Date.","examples":"\n**Example**\n\nReturns the time zone offset in milliseconds from UTC\n\n```arcade\nvar inputDate = Date(2011, 10, 11, 8, 0, 0, 0, \"America/New_York\")\nTimeZoneOffset(inputDate);\n// returns -18000000\n```\n\n","completion":{"label":"TimeZoneOffset","detail":"TimeZoneOffset(dateValue) -> Number","insertText":"TimeZoneOffset(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time zone offset in milliseconds from UTC for the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value from which to get the time zone offset.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"today","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#today","description":"Returns the current Date at midnight in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current Date at midnight, e.g. Mon Oct 24 2016 00:00:00 GMT-0700 (PDT)\n\n```arcade\nToday()\n```\n\n","completion":{"label":"Today","detail":"Today() -> Date","insertText":"Today($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current Date at midnight in the time zone of the profile's execution context.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [DateOnly()](https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"tolocal","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal","description":"Creates a new Date value matching the epoch of the input date and sets the time zone to the local or system time zone of the client.","examples":"\n**Example**\n\nCreates a date in local time at the same epoch as the input date\n\n```arcade\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nToLocal(Timestamp())\n```\n\n","completion":{"label":"ToLocal","detail":"ToLocal(inputDate) -> Date","insertText":"ToLocal(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new Date value matching the epoch of the input date and sets the time zone to the local or system time zone of the client.\n\n**Parameter**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value to represent in the local time of the client.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"toutc","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc","description":"Creates a new Date value matching the epoch of the input date and sets the time zone to UTC (Coordinated Universal Time).","examples":"\n**Example**\n\nCreates a Date in UTC time at the same epoch as the input date.\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nToUTC(Now())\n```\n\n","completion":{"label":"ToUTC","detail":"ToUTC(inputDate) -> Date","insertText":"ToUTC(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new Date value matching the epoch of the input date and sets the time zone to UTC (Coordinated Universal Time).\n\n**Parameter**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value to represent in UTC time.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"week","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#week","description":"Returns the week number in the year of the given Date. Values range from 0-53 where the first week of the year is `0` and the last week of the year is `51`, `52`, or `53`, depending on the year. The first and last weeks may not be a full seven days in length.","examples":"\n**Examples**\n\nUse the default start of the week (Sunday)\n\n```arcade\nWeek( Date(1974,0,3) )\n// Returns 0\n```\n\nSet start of week to Thursday\n\n```arcade\nWeek( Date(1974,0,3), 4 )\n// Returns 1\n```\n\nSet start of week to Friday\n\n```arcade\nWeek( Date(1974,0,3), 5 )\n// Returns 0\n```\n\n```arcade\nWeek( Date(1945,8,23) )\n// Returns 38\n```\n\n```arcade\nWeek( Date(2022,7,20) )\n// Returns 33\n```\n\nReturns the week from the DateOnly value\n\n```arcade\nWeek(DateOnly(1996, 11, 10))\n// returns 49\n```\n\n","completion":{"label":"Week","detail":"Week(dateValue, startDay?) -> Number","insertText":"Week(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the week number in the year of the given Date. Values range from 0-53 where the first week of the year is `0` and the last week of the year is `51`, `52`, or `53`, depending on the year. The first and last weeks may not be a full seven days in length.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to get the week. DateOnly values are supported starting at version 1.24.\n- **startDay** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the start day of the week. Sunday = 0; Monday = 1; Tuesday = 2; Wednesday = 3; Thursday = 4; Friday = 5; Saturday = 6. The default is `0` (Sunday).\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"weekday","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#weekday","description":"Returns the day of the week of the given Date. Values range from 0-6 where Sunday is `0` and Saturday is `6`.","examples":"\n**Examples**\n\nReturns the day of the week of the given date. Returns `3`, for Wednesday.\n\n```arcade\nWeekday(Date(1980, 11, 31))\n```\n\nReturns the day of the week of the given DateOnly value.\n\n```arcade\nWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"Weekday","detail":"Weekday(dateValue) -> Number","insertText":"Weekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the week of the given Date. Values range from 0-6 where Sunday is `0` and Saturday is `6`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to return the day of the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"year","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#year","description":"Returns the year of the given Date.","examples":"\n**Examples**\n\nGets the year of the current Date\n\n```arcade\nYear(Now())\n```\n\nGets the year of the given DateOnly value\n\n```arcade\nYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"Year","detail":"Year(dateValue) -> Number","insertText":"Year(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the year of the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to get the year. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"debugging_functions","title":"Debugging functions","items":[{"type":"function","name":"console","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#console","description":"Logs a message to a console for debugging purposes. This function can be especially useful for debugging expressions. Unlike most functions, `Console()` does not return a value; rather, it logs messages in a separate window for data inspection purposes only. The successful use of this function has no computational impact on the evaluation of the expression. The location of the console depends on the profile or context where the expression is authored. If authoring an expression in ArcGIS Online, logged messages are accessed in the \"Console\" tab of the results window in the Arcade Editor. Expressions executed in web clients will log console messages to the browser console.","examples":"\n**Example**\n\nLogs the value of `max` for each iteration of the loop within the function\n\n```arcade\n// The console window will log the following:\n// 'current item is: 10, but max = 10'\n// 'current item is: 0, but max = 10'\n// 'current item is: 84, but max = 84'\n// 'current item is: 30, but max = 84'\n\n// The expression evaluates to 84\nfunction findMax(yourArray) {\n var maxValue = -Infinity;\n for (var i in yourArray) {\n maxValue = IIf(yourArray[i] > maxValue, yourArray[i], maxValue);\n Console('current item is: ' + i + ', but maxValue = ' + maxValue);\n }\n return maxValue;\n}\nvar myArray = [ 10, 0, 84, 30 ];\nfindMax(myArray);\n```\n\n","completion":{"label":"Console","detail":"Console([value1, ..., valueN]?) -> Null","insertText":"Console($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nLogs a message to a console for debugging purposes. This function can be especially useful for debugging expressions. Unlike most functions, `Console()` does not return a value; rather, it logs messages in a separate window for data inspection purposes only. The successful use of this function has no computational impact on the evaluation of the expression. The location of the console depends on the profile or context where the expression is authored. If authoring an expression in ArcGIS Online, logged messages are accessed in the \"Console\" tab of the results window in the Arcade Editor. Expressions executed in web clients will log console messages to the browser console.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A list of variables, text, number, or dictionary to output in the messages window.\n\n**Return value**: Null"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"getenvironment","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#getenvironment","description":"Provides information about the context and environment where the Arcade expression is executed.","examples":"\n**Example**\n\nGets the environment of the client or system\n\n```arcade\nvar env = GetEnvironment()\n// equals the following when executed in a JavaScript Maps SDK application\n// {\n// \"version\":\"1.30\",\n// \"engine\":\"web\",\n// \"engineVersion\":\"4.32\",\n// \"application\":\"\",\n// \"locale\":\"en\",\n// \"spatialReference\": { \"wkid\": 102100 }\n// \"timeZone\":\"America/Los_Angeles\",\n// \"userTimeZone\":\"America/Los_Angeles\"\n// \"activePortal\": { \"url\": \"https://www.arcgis.com\" }\n// \"availablePortals\": [ { \"url\": \"https://www.arcgis.com\" } ]\n// }\nvar locale = IIF(HasValue(env, \"locale\"), env.locale, \"\");\n// returns the locale if it exists, otherwise returns an empty text value\nreturn locale;\n```\n\n","completion":{"label":"GetEnvironment","detail":"GetEnvironment() -> Dictionary","insertText":"GetEnvironment($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nProvides information about the context and environment where the Arcade expression is executed.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary containing the properties below. The properties returned may vary based on where you are running the Arcade expression, so it is recommended to use the `HasValue` function to ensure the desired environment property exists.\n\n- **version**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Arcade version. See the Arcade version matrix for more information about versioning.\n- **engine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The engine executing the Arcade expression. Possible values: `web`, `native`, `jvm`\n- **engineVersion**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The version of the engine executing the Arcade expression. See the Arcade version matrix for more information about versioning.\n- **application**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The application in which the Arcade expression is run. It is up to application developers to set this value. Therefore, this property may be empty depending on the app in which the expression executes.\n- **locale**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The locale of the client or system.\n- **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the Arcade context.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The well-known ID of the spatial reference.\n- **timeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.24_ The time zone of the expression's execution context. This is used when constructing and displaying Date values if a time zone is not otherwise specified.\n- **userTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.30_ The time zone of the device or browser executing the Arcade expression.\n- **activePortal**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - _Since 1.36_ The active portal of the expression's execution context.\n- **availablePortals**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Portal](https://developers.arcgis.com/arcade/guide/types/#portal)> - _Since 1.36_ The array of available portals of the expression's execution context.\n\n**Additional resources**\n\n* [Arcade profiles and execution context](https://developers.arcgis.com/arcade/guide/profiles/)\n* [Arcade version matrix](https://developers.arcgis.com/arcade/guide/version-matrix/)\n* [HasValue()](https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue)\n"}},"parametersInfo":{"min":0,"max":0}}]},{"id":"dictionary_functions","title":"Dictionary functions","items":[{"type":"function","name":"count","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#count","description":"Returns the number of entries in a dictionary.","examples":"\n**Example**\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nCount(d);\n// returns 3\n```\n\n","completion":{"label":"Count","detail":"Count(inputDictionary) -> Number","insertText":"Count(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of entries in a dictionary.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue1","description":"Returns a specified default value if a key in a dictionary does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nDefaultValue returns a defined value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is defined, so it is returned\n// returns Jan 24, 2024, 12:00:00 PM system time\n```\n\nDefaultValue returns a default if there is no value at the specified key.\n\n```arcade\nvar data = {\n time: '',\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is empty, so the default is returned\n// returns \"No time logged\"\n```\n\nDefaultValue returns a default if the key does not exist.\n\n```arcade\nvar data = {\n time: ''\n}\n\nDefaultValue(data, \"conditions\", \"n/a\")\n// the conditions key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a key in a dictionary does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the key does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue2","description":"Returns a specified default value if at least one of the keys in a nested dictionary does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nDefaultValue returns a defined value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], \"No time logged\")\n// value of data.weather.precipitation.value is defined, so it is returned\n// returns 0.4\n```\n\nDefaultValue returns a default if there is no value at the specified key.\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], 0)\n// value of data.weather.precipitation.value is null, so the default is returned\n// returns 0\n```\n\nDefaultValue returns a default if the key does not exist.\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"wind\", \"value\"], \"n/a\")\n// the data.weather.wind key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\nCheck null value in an array within a dictionary with key that exists\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"values\", 3], 0)\n// the value data.weather.precipitation.values[3] is null, so the default is returned\n// returns 0\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if at least one of the keys in a nested dictionary does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary1","description":"Returns a new dictionary based on the provided arguments. The arguments are name/value pairs. e.g. dictionary('field1',val,'field2',val2,...).","examples":"\n**Example**\n\nprints 3\n\n```arcade\nvar d = Dictionary('field1', 1, 'field2', 2)\nreturn d.field1 + d.field2\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary([name1, value1, ..., nameN, valueN]?) -> Dictionary","insertText":"Dictionary($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a new dictionary based on the provided arguments. The arguments are name/value pairs. e.g. dictionary('field1',val,'field2',val2,...).\n\n**Parameter**\n\n- **[name1, value1, ..., nameN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Ongoing name/value pairs.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary2","description":"Deserializes JSON text as an Arcade Dictionary.","examples":"\n**Example**\n\nDeserializes JSON as a Dictionary.\n\n```arcade\nvar extraInfo = '{\"id\": 1, \"population\": 200, \"city\": \"Spencer, ID\"}'\nvar spencerIDdata = Dictionary(extraInfo)\nspencerIDdata.population // Returns 200\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(jsonText) -> Dictionary","insertText":"Dictionary(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDeserializes JSON text as an Arcade Dictionary.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON to convert to an Arcade dictionary. This must be serialized as a text value.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary3","description":"Converts a geometry value to a dictionary.","examples":"\n**Example**\n\nUpdate the x attribute of a point geometry.\n\n```arcade\n// convert the $feature's geometry to a dictionary\nif (TypeOf(Geometry($feature)) == \"Point\") {\n var ptDict = Dictionary(Geometry($feature));\n ptDict.x *= 2; // stretch horizontally\n // create a new geometry from the updated dictionary\n return Geometry(ptDict);\n}\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputGeometry) -> Dictionary","insertText":"Dictionary(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a geometry value to a dictionary.\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to convert to an Arcade dictionary. Starting at version 1.25, Polygon or Polyline inputs may contain curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary4","description":"Converts a feature to a dictionary.","examples":"\n**Example**\n\nConvert a feature to a dictionary\n\n```arcade\n// convert $feature to a dictionary\nvar featureDict = Dictionary($feature);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputFeature) -> Dictionary","insertText":"Dictionary(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a feature to a dictionary.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary5","description":"Creates either a shallow or deep copy of a dictionary.","examples":"\n**Examples**\n\nCreate a shallow copy of a Dictionary\n\n```arcade\nvar inputDict = {\n company: {\n name: \"Esri\",\n location: \"Redlands, CA\"\n },\n office: \"M123\"\n};\nvar copiedDict = Dictionary(inputDict);\nreturn inputDict.company == copiedDict.company\n// returns true\n// this is a shallow copy of the Dictionary, so the dictionaries share the same references\n```\n\nCreate a deep copy of a Dictionary\n\n```arcade\nvar deepCopy = Dictionary(inputDict, true);\nreturn inputDict.company == deepCopy.company\n// returns false\n// this is a deep copy of the Dictionary, so the dictionaries do NOT share the same references\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputDictionary, deep?) -> Dictionary","insertText":"Dictionary(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates either a shallow or deep copy of a dictionary.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to copy.\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - If `true`, creates a deep copy of the dictionary will be created, meaning the properties of the output dictionary will not share the same references as the input dictionary. Default value is `false`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary6","description":"Converts a voxel to a dictionary.","examples":"\n**Example**\n\nConvert a voxel to a dictionary\n\n```arcade\n// convert $voxel to a dictionary\nvar voxelDict = Dictionary($voxel);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputVoxel) -> Dictionary","insertText":"Dictionary(${1:inputVoxel_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a voxel to a dictionary.\n\n**Parameter**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary7","description":"Casts a pixel to a dictionary.","examples":"\n**Example**\n\nConvert a pixel to a dictionary\n\n```arcade\nvar pixelDict = Dictionary($pixel);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputPixel) -> Dictionary","insertText":"Dictionary(${1:inputPixel_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCasts a pixel to a dictionary.\n\n**Parameter**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"erase","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#erase","description":"Removes a key-value pair from a dictionary.","examples":"\n**Example**\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nErase(d, 'Grafton');\nreturn d;\n// returns {'Port Hope': 16214, 'Cobourg': 18519};\n```\n\n","completion":{"label":"Erase","detail":"Erase(inputDictionary, key) -> Null","insertText":"Erase(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves a key-value pair from a dictionary.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to remove.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"fromjson","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#fromjson","description":"Deserializes JSON text into its equivalent Arcade data types.","examples":"\n**Examples**\n\nConverts text to a boolean\n\n```arcade\nFromJSON(\"true\")\n// Returns true\n```\n\nConverts text to a number\n\n```arcade\nfromJSON(\"731.1\")\n// returns 731.1\n```\n\nConverts text to a dictionary\n\n```arcade\nvar d = fromJSON('{\"kids\": 3, \"adults\": 4 }')\nd.kids + d.adults\n// returns 7\n```\n\nConverts text to an array\n\n```arcade\nfromJSON('[\"one\", 2, \"three\", false]')\n// returns [ \"one\", 2, \"three\", false ]\n```\n\nConverts text to null\n\n```arcade\nfromJSON(\"null\")\n// returns null\n```\n\n","completion":{"label":"FromJSON","detail":"FromJSON(jsonText) -> Dictionary,Array<Any>,Text,Boolean,Number","insertText":"FromJSON(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDeserializes JSON text into its equivalent Arcade data types.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text to deserialize to an Arcade data type.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getkeys","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#getkeys","description":"Returns an array of all keys in the dictionary, sorted alphabetically.","examples":"\n**Example**\n\nReturns an array of keys from the dictionary, in alphabetical order.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nGetKeys(d);\n// returns ['Cobourg', 'Grafton', 'Port Hope']\n```\n\n","completion":{"label":"GetKeys","detail":"GetKeys(inputDictionary) -> Array<Text>","insertText":"GetKeys(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of all keys in the dictionary, sorted alphabetically.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to get keys from.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getvalues","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#getvalues","description":"Returns an array of all values in the dictionary, ordered to match the alphabetical sorting of their keys.","examples":"\n**Example**\n\nreturns `[18519, '<1000', 16214]`\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nreturn GetValues(d);\n```\n\n","completion":{"label":"GetValues","detail":"GetValues(inputDictionary) -> Array<Any>","insertText":"GetValues(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of all values in the dictionary, ordered to match the alphabetical sorting of their keys.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to get values from.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#haskey","description":"Indicates whether a dictionary has the input key.","examples":"\n**Example**\n\nprints `true`\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nHasKey(d, 'Cobourg');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputDictionary, key) -> Boolean","insertText":"HasKey(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a dictionary has the input key.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to check for a key.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue1","description":"Indicates whether a dictionary has a given key and if that key has a value.","examples":"\n**Examples**\n\nDictionary with key that has a value\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nHasValue(d, 'Cobourg');\n// returns true\n```\n\nDictionary with key that does not have a value\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', null);\nHasValue(d, 'Cobourg');\n// returns false\n```\n\nDictionary without the provided key\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000');\nHasValue(d, 'Cobourg');\n// returns false\n```\n\nDictionary without the provided key\n\n```arcade\nif ( HasValue( Schema($feature).fields[0], \"domain\" ) ) {\n // Do something with the value if true\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, key) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a dictionary has a given key and if that key has a value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key or field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue2","description":"Checks whether a property nested several levels deep in a dictionary has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nCheck dictionary with key that has a nested value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"value\"])){\n // if() evaluates to true, thus executing the return\n return data.weather.precipitation.value;\n}\n```\n\nCheck value in a dictionary with key that does not exist\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 0])){\n // if() evaluates to false (\"values\" does not exist), thus avoiding the block\n return data.weather.precipitation.values;\n}\n```\n\nCheck value in an array within a dictionary with key that does exist\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 6])){\n // if() evaluates to true, thus executing the return\n return data.weather.precipitation.values[6];\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, keys) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether a property nested several levels deep in a dictionary has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"insert","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#insert","description":"Inserts a key-value pair into the dictionary. If the key already exists, its value will be updated.","examples":"\n**Examples**\n\nInserts a new key-value pair into a dictionary.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nInsert(d, 'Colborne', 1474);\nreturn d;\n// returns {'Port Hope': 16214, 'Grafton': '<1000', 'Cobourg': 18519, 'Colborne': 1474}\n```\n\nUpdates the value for an existing key in a dictionary.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nInsert(d, 'Grafton', 1200);\nreturn d;\n// returns {'Port Hope': 16214, 'Grafton': 1200, 'Cobourg': 18519}\n```\n\n","completion":{"label":"Insert","detail":"Insert(inputDictionary, key, value) -> Null","insertText":"Insert(${1:inputDictionary_}, ${2:key_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a key-value pair into the dictionary. If the key already exists, its value will be updated.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to insert.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to insert.\n\n**Return value**: Null"}},"parametersInfo":{"min":3,"max":3}}]},{"id":"enterprise_functions","title":"Enterprise functions","items":[{"type":"function","name":"nextsequencevalue","bundle":"database","sinceVersion":"1.4","link":"https://developers.arcgis.com/arcade/function-reference/enterprise_functions/#nextsequencevalue","description":"Returns the next sequence value from the database sequence specified. If `inputSequenceName` does not exist, the expression will error.","examples":"\n**Example**\n\nReturns a number with the next sequence value\n\n```arcade\nNextSequenceValue('PipeIDSeq')\n```\n\n","completion":{"label":"NextSequenceValue","detail":"NextSequenceValue(sequenceName) -> Number","insertText":"NextSequenceValue(${1:sequenceName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.4](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the next sequence value from the database sequence specified. If `inputSequenceName` does not exist, the expression will error.\n\n**Parameter**\n\n- **sequenceName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the sequence. This must already be configured in the database.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"feature_functions","title":"Feature functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#defaultvalue","description":"Returns a specified default value if a field name in a feature does not exist or the value at the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"n/a\" if feature attribute does not exist or is empty\n\n```arcade\nDefaultValue($feature, \"population\", \"n/a\")\n// Returns the population value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputFeature, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputFeature_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a feature does not exist or the value at the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input feature to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value at the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"domain","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domain","description":"Returns the domain assigned to the given field of the provided `feature`. If the `feature` belongs to a class with a subtype, this returns the domain assigned to the subtype.","examples":"\n**Example**\n\nThe domain assigned to the feature's subtype\n\n```arcade\nvar d = Domain($feature, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n// type: \"codedValue\" ,\n// name: \"poleTypes\",\n// dataType: \"number\",\n// codedValues: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Wood\", code: 1 },\n// { name: \"Steel\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(inputFeature, fieldName) -> Dictionary","insertText":"Domain(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the domain assigned to the given field of the provided `feature`. If the `feature` belongs to a class with a subtype, this returns the domain assigned to the subtype.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) assigned the domain.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of domain - either `codedValue` or `range`.\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The domain name.\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The data type of the domain field. It can be one of the following values: `esriFieldTypeSmallInteger`, `esriFieldTypeInteger`, `esriFieldTypeBigInteger`, `esriFieldTypeSingle`, `esriFieldTypeDouble`, `esriFieldTypeString`, `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Only applicable to `codedValue` domains. An array of dictionaries describing the valid values for the field. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`).\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The minimum value of the domain.\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The maximum value of the domain."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domaincode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domaincode","description":"Returns the code of an associated domain description in a feature.","examples":"\n**Example**\n\nprints the domain code for the field referenced.\n\n```arcade\nDomainCode($feature, 'Enabled', 'True')\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(inputFeature, fieldName, value?, subtype?) -> Number,Text","insertText":"DomainCode(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the code of an associated domain description in a feature.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **value** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value to be converted back into a code.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name for the subtype if the feature supports subtyping. If not provided, the current feature's subtype (if it has one), will be used.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"domainname","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domainname","description":"Returns the descriptive name for a domain code in a feature.","examples":"\n**Example**\n\nprints the domain description for the referenced field\n\n```arcade\nDomainName($feature, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(inputFeature, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the descriptive name for a domain code in a feature.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The code associated with the desired descriptive name. If not provided, the field value in the feature will be returned.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name of the subtype if the feature supports subtyping. If not provided, the feature's subtype (if it has one) will be used.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"expects","bundle":"core","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#expects","description":"Requests additional attributes for the given feature. In some profiles, such as Visualization and Labeling, apps only request the data attributes required for rendering each feature or label. Some expressions dynamically reference field names with variables rather than text literals. This makes it hard for rendering and labeling engines to detect fields required for rendering. This function allows you to explicitly indicate required fields as a list. You can also request all or a subset of fields using a wildcard. Because expressions execute on a per feature basis, the wildcard should be used with caution, especially in layers containing many features. Requesting too much data can result in poor app performance.","examples":"\n**Examples**\n\nRequests fields not easily detected by the renderer\n\n```arcade\n// Request multiple years of population data if the\n// fields cannot be easily detected by the renderer or labels\nExpects($feature, 'POP_2020', 'POP_2010')\nvar thisYear = 2020;\nvar lastDecade = thisYear - 10;\nreturn $feature['POP_'+thisYear] - $feature['POP_'+lastDecade]\n```\n\nRequests all data matching a pattern in the field name\n\n```arcade\n// Request all the data beginning with 'POP'. This is\n// necessary because the renderer can't easily detect\n// the required fields based on this expression\nExpects($feature, 'POP*')\n\nvar startYear = 1880;\nvar endYear = 2020;\nvar changes = [];\n\nfor(var y=startYear; y<endYear; y+=10){\n var startPop = $feature['POP_' + y];\n var endPop = $feature['POP_' + (y+10)];\n var change = endPop - startPop;\n Push(changes, change);\n}\nMax(changes);\n```\n\nRequests all data for the feature\n\n```arcade\n// Request all fields because the required fields may\n// be based on unknown information like a relative date\nExpects($feature, '*')\n\nvar casesToday = $feature[ 'CASES_' + Text(d, 'MM_DD_Y') ];\nvar casesYesterday = $feature[ 'CASES_' + Text(DateAdd( Today(), -1, 'days', 'MM_DD_Y') ];\n// Change in cases from yesterday\nreturn casesToday - casesYesterday;\n```\n\n","completion":{"label":"Expects","detail":"Expects(inputFeature, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:inputFeature_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRequests additional attributes for the given feature. In some profiles, such as Visualization and Labeling, apps only request the data attributes required for rendering each feature or label. Some expressions dynamically reference field names with variables rather than text literals. This makes it hard for rendering and labeling engines to detect fields required for rendering. This function allows you to explicitly indicate required fields as a list. You can also request all or a subset of fields using a wildcard. Because expressions execute on a per feature basis, the wildcard should be used with caution, especially in layers containing many features. Requesting too much data can result in poor app performance.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to which the requested fields will be attached.\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A field name to request for the given feature. List only fields required for use in the expression. If necessary, you can request all fields using the wildcard `*` character. However, this should be avoided to prevent loading an unnecessary amount of data that can negatively impact app performance. This value must be a text literal and cannot be a variable.\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ongoing list of field names to request for the given feature. List only fields required for use in the expression. These values must be text literals and cannot be variables.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature1","description":"Creates a new feature.","examples":"\n**Example**\n\n```arcade\nFeature(pointGeometry, 'city_name', 'Spokane', 'population', 210721)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attribute1, value1, [attribute2, value2, ..., attributeN, valueN]?) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attribute1_}, ${3:value1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry of the feature.\n- **attribute1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The first attribute's name.\n- **value1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - The first attribute's value.\n- **[attribute2, value2, ..., attributeN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Ongoing name/value pairs for each attribute in the feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature2","description":"Creates a new feature from a serialized JSON string.","examples":"\n**Example**\n\n```arcade\nvar JSONString = '{\"geometry\":{\"x\":10,\"y\":20,\"spatialReference\":{\"wkid\":102100}},\"attributes\":{\"hello\":10}}'\nvar ftr1 = Feature(JSONString)\n```\n\n","completion":{"label":"Feature","detail":"Feature(jsonText) -> Feature","insertText":"Feature(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a serialized JSON string.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The serialized JSON representing a feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature3","description":"Creates a new feature from a geometry and dictionary of attributes.","examples":"\n**Example**\n\n```arcade\nvar dict = { hello:10 }\nvar p = point({x:10, y:20, spatialReference:{wkid:102100}})\nvar ftr = Feature(p,dict)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attributes) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attributes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a geometry and dictionary of attributes.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry of the feature.\n- **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary containing the attributes and their values.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature4","description":"Creates a new feature from a dictionary.","examples":"\n**Example**\n\nCreate a new feature from a dictionary\n\n```arcade\nvar featureDict = {\n geometry: Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n attributes: {\n name1: \"value1\",\n name2: \"value2\"\n }\n};\n// create a new feature from a dictionary of geometry and attributes\nvar newFeature = Feature(featureDict);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputDictionary) -> Feature","insertText":"Feature(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a dictionary.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary with the feature geometry and attributes.\n\n - **geometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The geometry of the feature. If `geometry` is a Dictionary, then a new Geometry will be constructed using the `Geometry` function. If `geometry` is null or missing from the dictionary, then the Feature will be created with a `null` geometry.\n - **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary containing the attributes and their values.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature5","description":"Creates a copy of a feature.","examples":"\n**Example**\n\nCreates a copy of a feature\n\n```arcade\nvar copiedFeature = Feature($feature);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputFeature) -> Feature","insertText":"Feature(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to copy\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featureinfilter","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#featureinfilter","description":"Indicates whether the given feature is included in the provided SQL where clause. If the provided feature is included in the where clause, the function returns `true`; otherwise, it returns `false`. This function is useful for testing whether a feature meets a specific condition. If the input feature is `null`, the function returns `false`. If the `whereClause` is `null` or empty, the function returns `true`. If both parameters are `null`, the function returns `false`.","examples":"\n**Example**\n\nReturn true if feature is included in the provided SQL where clause.\n\n```arcade\n// The provided feature has a 'magnitude' field with a value of 5.2\nif(FeatureInFilter($feature, 'magnitude >= 5')) {\n return 'Significant earthquake';\n}\nreturn 'Minor earthquake';\n```\n\n","completion":{"label":"FeatureInFilter","detail":"FeatureInFilter(inputFeature, whereClause) -> Boolean","insertText":"FeatureInFilter(${1:inputFeature_}, ${2:whereClause_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the given feature is included in the provided SQL where clause. If the provided feature is included in the where clause, the function returns `true`; otherwise, it returns `false`. This function is useful for testing whether a feature meets a specific condition. If the input feature is `null`, the function returns `false`. If the `whereClause` is `null` or empty, the function returns `true`. If both parameters are `null`, the function returns `false`.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check.\n- **whereClause**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL where clause used to test the feature's inclusion. An invalid SQL where clause will result in an error. Standardized SQL-92 is accepted.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"gdbversion","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#gdbversion","description":"Returns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.","examples":"\n**Example**\n\nReturns the geodatabase version of the given feature\n\n```arcade\nGdbVersion($feature)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(inputFeature) -> Text","insertText":"GdbVersion(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A Feature from which to return the current geodatabase version of the associated layer.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#haskey","description":"Indicates whether a feature has the input key.","examples":"\n**Example**\n\nReturns `true` if the feature has a field named `temp`\n\n```arcade\nHasKey($feature, 'temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputFeature, key) -> Boolean","insertText":"HasKey(${1:inputFeature_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a feature has the input key.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check for a field name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#hasvalue","description":"Indicates whether a feature has a given field and if that field has a value.","examples":"\n**Example**\n\nReturn false if feature attribute does not exist or is empty\n\n```arcade\nif(HasValue($feature, \"population\")){\n return $feature.population / AreaGeodetic($feature)\n}\n// Returns the population density if population is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputFeature, fieldName) -> Boolean","insertText":"HasValue(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a feature has a given field and if that field has a value.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#schema","description":"Returns the schema description of the provided Feature.","examples":"","completion":{"label":"Schema","detail":"Schema(inputFeature) -> Dictionary","insertText":"Schema(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the schema description of the provided Feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature whose schema to return.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Returns an array of dictionaries describing the fields in the Feature. Each dictionary describes the field `name`, `alias`, `type`, `subtype`, `domain`, `length`, and whether it is `editable` and `nullable`.\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The geometry type of features in the Feature. Returns `esriGeometryNull` for tables with no geometry. \nPossible values: `esriGeometryPoint`, `esriGeometryLine`, `esriGeometryPolygon`, `esriGeometryNull`\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The global ID field of the Feature. Returns `\"\"` if not globalId-enabled.\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The objectId field of the Feature."}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypecode","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypecode","description":"Returns the subtype code for a given feature.","examples":"\n**Example**\n\nReturns the code of the subtype\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeCode($feature) // returns 1\n```\n\n","completion":{"label":"SubtypeCode","detail":"SubtypeCode(inputFeature) -> Number,Text,Date","insertText":"SubtypeCode(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype code for a given feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get the subtype code.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypename","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypename","description":"Returns the subtype name for a given feature.","examples":"\n**Example**\n\nReturns the name of the subtype\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeName($feature) // returns \"Single Phase\"\n```\n\n","completion":{"label":"SubtypeName","detail":"SubtypeName(inputFeature) -> Text","insertText":"SubtypeName(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype name for a given feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get the subtype name.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypes","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypes","description":"Returns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.","examples":"\n**Example**\n\nReturns subtypes with coded values from a feature\n\n```arcade\nSubtypes($feature)\n// returns the following dictionary\n// {\n// subtypeField: 'assetGroup',\n// subtypes: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Single Phase\", code: 1 },\n// { name: \"Two Phase\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(inputFeature) -> Dictionary","insertText":"Subtypes(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field containing a subtype.\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries describing the subtypes. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"timereceived","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#timereceived","description":"Returns the time a feature was received by the client. This is primarily used for calculating the age of a feature when rendering data in a stream layer. Returns `null` if no feature is provided or if the source layer is not a stream layer.","examples":"\n**Example**\n\nReturns the age of the feature (in seconds) since it was received by the client application.\n\n```arcade\nvar received = TimeReceived($feature);\nif(received){\n var age = DateDiff( Now(), received, \"seconds\");\n return age;\n}\n```\n\n","completion":{"label":"TimeReceived","detail":"TimeReceived(inputFeature) -> Date","insertText":"TimeReceived(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time a feature was received by the client. This is primarily used for calculating the age of a feature when rendering data in a stream layer. Returns `null` if no feature is provided or if the source layer is not a stream layer.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - An input feature from a stream layer.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"featureset_functions","title":"FeatureSet functions","items":[{"type":"function","name":"area","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area","description":"Returns the area of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the layer in square kilometers\n\n```arcade\nArea($layer, 'square-kilometers')\n```\n\n","completion":{"label":"Area","detail":"Area(features, unit?) -> Number","insertText":"Area(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the area of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic","description":"Returns the geodetic area of the input FeatureSet in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic area of the layer in square kilometers\n\n```arcade\nAreaGeodetic($layer, 'square-kilometers')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(features, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic area of the input FeatureSet in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the geodetic area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic area calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"attachments","bundle":"data-access","sinceVersion":"1.6","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#attachments","description":"Returns a list of attachments associated with the input feature. Each result includes the name of the attachment, the content type, id, and size in bytes. Only applicable to features originating from a feature service.","examples":"\n**Example**\n\nReturns the number of attachments associated with the feature\n\n```arcade\n// Returns the number of attachments associated with the feature\nCount(Attachments($feature))\n```\n\n","completion":{"label":"Attachments","detail":"Attachments(inputFeature, options?) -> Array<Attachment>","insertText":"Attachments(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.6](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a list of attachments associated with the input feature. Each result includes the name of the attachment, the content type, id, and size in bytes. Only applicable to features originating from a feature service.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - Attachments associated with this feature will be fetched from the service.\n- **options** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Settings for the request. Dictionary properties:\n\n - **types**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of text values representing the file types to fetch. \nPossible Values: `bmp`, `ecw`, `emf`, `eps`, `ps`, `gif`, `img`, `jp2`, `jpc`, `j2k`, `jpf`, `jpg`, `jpeg`, `jpe`, `png`, `psd`, `raw`, `sid`, `tif`, `tiff`, `wmf`, `wps`, `avi`, `mpg`, `mpe`, `mpeg`, `mov`, `wmv`, `aif`, `mid`, `rmi`, `mp2`, `mp3`, `mp4`, `pma`, `mpv2`, `qt`, `ra`, `ram`, `wav`, `wma`, `doc`, `docx`, `dot`, `xls`, `xlsx`, `xlt`, `pdf`, `ppt`, `pptx`, `txt`, `zip`, `7z`, `gz`, `gtar`, `tar`, `tgz`, `vrml`, `gml`, `json`, `xml`, `mdb`, `geodatabase`\n - **minsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The minimum file size of the attachment in bytes.\n - **maxsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum file size of the attachment in bytes.\n - **metadata** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include attachment metadata in the function return. Only Exif metadata for images is currently supported.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"average","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#average","description":"Returns the average value of a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the difference between the feature's population and the average population of all features in the layer\n\n```arcade\n$feature.population - Average($layer, 'population')\n```\n\ncalculates the average population per square mile of all features in the layer\n\n```arcade\nAverage($layer, 'population / area')\n```\n\n","completion":{"label":"Average","detail":"Average(features, fieldNameOrSQLExpression) -> Number","insertText":"Average(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average value of a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#contains","description":"Returns features from a FeatureSet that are contained within the input geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\nReturns the number of features that are within the given polygon\n\n```arcade\nvar parcels = FeatureSetByName($map, 'parcels')\nvar projectArea = $feature;\nCount(Contains(projectArea, parcels));\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideFeatures) -> FeatureSet","insertText":"Contains(${1:containerGeometry_}, ${2:insideFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that are contained within the input geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'contains' relationship to `insideFeatures`. Think of this geometry as the potential 'container' of the `insideFeatures`.\n- **insideFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the 'within' relationship to the `containerGeometry`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"count","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#count","description":"Returns the number of features in a FeatureSet.","examples":"\n**Example**\n\nReturns the number of features in a layer\n\n```arcade\nCount($layer)\n```\n\n","completion":{"label":"Count","detail":"Count(features) -> Number","insertText":"Count(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of features in a FeatureSet.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to count the number of features\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#crosses","description":"Returns features from a FeatureSet that cross the input geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the FeatureSet that cross the given polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Crosses($layer, geom2) );\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(features, crossingGeometry) -> FeatureSet","insertText":"Crosses(${1:features_}, ${2:crossingGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that cross the input geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features to test the crosses relationship with the input `crossingGeometry`.\n- **crossingGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being crossed.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distinct","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#distinct","description":"Returns a set of distinct, or unique, values from a FeatureSet.","examples":"\n**Examples**\n\nReturns a FeatureSet with a 'Status' column. Each row of the FeatureSet contains a unique status value\n\n```arcade\nDistinct($layer, 'Status')\n```\n\nReturns a FeatureSet with a 'Status' and a 'Type' column. Each row of the FeatureSet contains a unique combination of 'Status' and 'Type' values\n\n```arcade\nDistinct($layer, ['Status', 'Type'])\n```\n\nReturns FeatureSet with a Density column with rows that may contain values of Low, High, or N/A\n\n```arcade\nDistinct($layer, {\n name: \"Density\",\n expression: \"CASE WHEN PopDensity < 100 THEN 'Low' WHEN PopDensity >= 100 THEN 'High' ELSE 'N/A' END\"\n})\n```\n\nReturns FeatureSet with a Score and a Type column\n\n```arcade\nDistinct($layer, [{\n name: 'Score',\n expression: 'POPULATION_DENSITY * 0.65 + Status_Code * 0.35'\n}, {\n name: 'Type',\n expression: 'Category'\n}])\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(features, fields) -> FeatureSet","insertText":"Distinct(${1:features_}, ${2:fields_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return distinct values.\n- **fields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The field(s) and/or expression(s) from which to determine unique values. This parameter can be an array of field names, an array of expressions, or a dictionary or array of dictionary that specify output column names where unique values will be stored. If a dictionary is specified, the folowing specification must be used:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given expression.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression from which to calculate a unique value.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domain","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domain","description":"Returns the domain assigned to the given field of the provided `featureSet`. If the `featureSet` belongs to a class with a subtype, this returns the domain assigned to the subtype.","examples":"\n**Example**\n\nThe domain assigned to the feature's subtype\n\n```arcade\nvar fsPole = FeatureSetByName($layer, \"Pole\", 1);\nvar d = Domain(fsPole, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n// type: \"codedValue\" ,\n// name: \"poleTypesThreePhase\",\n// dataType: \"number\",\n// codedValues: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Wood\", code: 1 },\n// { name: \"Steel\", code: 2 }\n// { name: \"Reinforced Steel\", code: 3 }\n// ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(features, fieldName, subtype?) -> Dictionary","insertText":"Domain(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the domain assigned to the given field of the provided `featureSet`. If the `featureSet` belongs to a class with a subtype, this returns the domain assigned to the subtype.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet whose features contain a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **subtype** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The coded value for the subtype if the feature supports subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of domain - either `codedValue` or `range`.\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The domain name.\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The data type of the domain field. It can be one of the following values: `esriFieldTypeSmallInteger`, `esriFieldTypeInteger`, `esriFieldTypeBigInteger`, `esriFieldTypeSingle`, `esriFieldTypeDouble`, `esriFieldTypeString`, `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The minimum value of the domain.\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The maximum value of the domain.\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Only applicable to `codedValue` domains. An array of dictionaries describing the valid values for the field. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)."}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"domaincode","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domaincode","description":"Returns the code of an associated domain description in a FeatureSet.","examples":"\n**Example**\n\nPrints the domain description for the field referenced.\n\n```arcade\nDomainCode($layer, 'Enabled', 'True', subtype)\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(features, fieldName, value, subtype?) -> Number,Text","insertText":"DomainCode(${1:features_}, ${2:fieldName_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the code of an associated domain description in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The feature set with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value to be converted back into a code. The returned code comes from the service metadata.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name for the subtype if the feature set supports subtyping.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"domainname","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domainname","description":"Returns the descriptive name for a domain code in a FeatureSet.","examples":"\n**Example**\n\nprints the domain description for the referenced field\n\n```arcade\nDomainName($layer, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(features, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the descriptive name for a domain code in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The code associated with the desired descriptive name. The returned code comes from the service metadata.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name of the subtype if the FeatureSet supports subtyping.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"envelopeintersects","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#envelopeintersects","description":"Returns features from a FeatureSet where the envelopes (or extent) of a set of features intersect the envelope of another geometry. In the graphic below, the red highlight illustrates the spatial relationships where the function will return features.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that intersect the envelope of geom2\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( EnvelopeIntersects($layer, geom2) );\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(features, envelope) -> FeatureSet","insertText":"EnvelopeIntersects(${1:features_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet where the envelopes (or extent) of a set of features intersect the envelope of another geometry. In the graphic below, the red highlight illustrates the spatial relationships where the function will return features.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the intersects relationship to the input `envelope`.\n- **envelope**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The envelope being intersected.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"expects","bundle":"data-access","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#expects","description":"Requests additional attributes for the given FeatureSet.","examples":"\n**Example**\n\nRequests the POPULATION field for the features in the cluster\n\n```arcade\n// If the layer is clustered based on count,\n// only the OBJECTID field is requested by default.\n// To display the sum of the POPULATION field\n// for all features in the cluster, we must\n// explicitly request the POPULATION data. \nExpects($aggregatedFeatures, 'POPULATION')\nText(Sum($aggregatedFeatures, 'POPULATION'), '#,###')\n```\n\n","completion":{"label":"Expects","detail":"Expects(features, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:features_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRequests additional attributes for the given FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The feature set to which the requested fields will be attached.\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A field name to request for the given feature. List only fields required for use in the expression. If necessary, you can request all fields using the wildcard `*` character. However, this should be avoided to prevent loading an unnecessary amount of data that can negatively impact app performance. This value must be a text literal and cannot be a variable.\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ongoing list of field names to request for the given feature. List only fields required for use in the expression. These values must be text literals and cannot be variables.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset1","description":"Creates a new FeatureSet from JSON according to the ArcGIS REST spec. See the snippet below for an example of this.","examples":"\n**Example**\n\nCreate a FeatureSet from JSON.\n\n```arcade\n// JSON representation of the feature used in the snippet below\n// {\n// 'fields': [{\n// 'alias': 'RANK',\n// 'name': 'RANK',\n// 'type': 'esriFieldTypeInteger'\n// }, {\n// 'alias': 'ELEV_m',\n// 'name': 'ELEV_m',\n// 'type': 'esriFieldTypeInteger'\n// }],\n// 'spatialReference': { 'wkid': 4326 },\n// 'geometryType': 'esriGeometryPoint',\n// 'features': [{\n// 'geometry': {\n// 'spatialReference': { 'wkid': 4326 },\n// 'x': -151.0063,\n// 'y': 63.069\n// },\n// 'attributes': {\n// 'RANK': 1,\n// 'ELEV_m': 6168\n// }\n// }]\n// };\n// The Dictionary representation of the FeatureSet must be a serialized text value\nvar features = FeatureSet('{\"fields\":[{\"alias\":\"RANK\",\"name\":\"RANK\",\"type\":\"esriFieldTypeInteger\"},{\"alias\":\"ELEV_m\",\"name\":\"ELEV_m\",\"type\":\"esriFieldTypeInteger\"}],\"spatialReference\":{\"wkid\":4326},\"geometryType\":\"esriGeometryPoint\",\"features\":[{\"geometry\":{\"spatialReference\":{\"wkid\":4326},\"x\":-151.0063,\"y\":63.069},\"attributes\":{\"RANK\":1,\"ELEV_m\":6168}}]}')\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet from JSON according to the ArcGIS REST spec. See the snippet below for an example of this.\n\n**Parameter**\n\n- **definition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON describing a set of features. The JSON must be serialized as a text value.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset2","description":"Creates a new FeatureSet from a Dictionary representing JSON according to the ArcGIS REST spec. See the snippet below for an example of this.","examples":"\n**Example**\n\nCreate a FeatureSet from dictionary.\n\n```arcade\n// JSON representation of the feature used in the snippet below\nvar d = {\n fields: [{\n alias: 'RANK',\n name: 'RANK',\n type: 'esriFieldTypeInteger'\n }, {\n alias: 'ELEV_m',\n name: 'ELEV_m',\n type: 'esriFieldTypeInteger'\n }],\n spatialReference: { wkid: 4326 },\n geometryType: 'esriGeometryPoint',\n features: [{\n geometry: {\n spatialReference: { wkid: 4326 },\n x: -151.0063,\n y: 63.069\n },\n attributes: {\n RANK: 1,\n ELEV_m: 6168\n }\n }]\n };\nvar features = FeatureSet(d)\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet from a Dictionary representing JSON according to the ArcGIS REST spec. See the snippet below for an example of this.\n\n**Parameter**\n\n- **definition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A Dictionary describing a set of features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featuresetbyassociation","bundle":"data-access","sinceVersion":"1.9","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyassociation","description":"Returns all the features associated with the input feature as a FeatureSet. This is specific to Utility Network workflows.","examples":"\n**Examples**\n\nReturns all assets that have connectivity associations with the low side terminal of the transformer.\n\n```arcade\nFeatureSetByAssociation($feature, 'connected', 'Low');\n```\n\nReturns the number of electric devices associated with the feature\n\n```arcade\nvar allContent = FeatureSetByAssociation ($feature, \"content\");\nvar devicesRows = Filter(allContent, \"className = 'Electric Device'\");\nvar devicesCount = Count(devicesRows);\nreturn devicesCount;\n```\n\n","completion":{"label":"FeatureSetByAssociation","detail":"FeatureSetByAssociation(inputFeature, associationType, terminalName?) -> FeatureSet","insertText":"FeatureSetByAssociation(${1:inputFeature_}, ${2:associationType_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.9](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns all the features associated with the input feature as a FeatureSet. This is specific to Utility Network workflows.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature from which to query for all associated features. This feature must be coming from a feature service; feature collections are not supported.\n- **associationType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of association with the feature to be returned. \n Possible Values: `connected` \\| `container` \\| `content` \\| `structure` \\| `attached` \n Possible Values added at version 1.10: `junctionEdge` \\| `midspan`\n- **terminalName** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Only applicable to `connected` association types.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) \nReturns a FeatureSet containing features with the field specification described in the table below.\n\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The class name based on the value of `TONETWORKSOURCEID` or `FROMNETWORKSOURCEID`.\n- **globalId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Global ID of the feature in the other table (i.e. either the value of `TOGLOBALID` or `FROMGLOBALID`).\n- **isContentVisible**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Can either be a value of `1` (visible) or `0` (not visible). This value represents the visibility of the associated content and is only applicable for containment associations.\n- **objectId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The ObjectID of the row in the association table.\n- **percentAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applies to `midspan` association types. Returns a floating point number from 0-1 indicating the location (as a ratio) of the junction along the edge.\n- **side**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Applies to `junctionEdge` association types. Indicates which side the junction is on.\n\nPossible values: `from` or `to`"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"featuresetbyid","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyid","description":"Creates a FeatureSet from a Feature Layer based on its layer ID within a map or feature service. Limiting the number of fields in the request and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer with the id DemoLayerWM_1117 in the given map.\n\n```arcade\nvar features = FeatureSetById($map,'DemoLayerWM_1117', ['*'], true);\nCount( features );\n```\n\n","completion":{"label":"FeatureSetById","detail":"FeatureSetById(featureSetCollection, id, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetById(${1:featureSetCollection_}, ${2:id_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer based on its layer ID within a map or feature service. Limiting the number of fields in the request and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The ID of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. _Please note that this value must be a text literal._\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. By default, this is `true`. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyname","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyname","description":"Creates a FeatureSet from a Feature Layer based on its name within a map or feature service. Keep in mind this name is not necessarily unique. It is therefore more appropriate to create a FeatureSet using `FeatureSetById()`. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer with the title 'Bike routes' in the given map.\n\n```arcade\nvar features = FeatureSetByName($map,'Bike routes', ['*'], true);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByName","detail":"FeatureSetByName(featureSetCollection, title, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByName(${1:featureSetCollection_}, ${2:title_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer based on its name within a map or feature service. Keep in mind this name is not necessarily unique. It is therefore more appropriate to create a FeatureSet using `FeatureSetById()`. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.\n- **title**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The title of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. _Please note that this value must be a text literal._\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. By default, this is `true`. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipclass","bundle":"data-access","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipclass","description":"Returns the related records for a given feature based on the name of a given relationship class.","examples":"\n**Example**\n\nReturns the count of pole inspection related records\n\n```arcade\n// A calculation rule that returns the count of a pole inspection records.\n// When a pole feature is updated the calculation rule reads all its related inspections records from the comments field and returns the total inspection count for that feature.\nvar fsinspected = FeatureSetByRelationshipClass($feature, “pole_inspection”, [“comments”], false);\nreturn Count(fsinspected);\n```\n\n","completion":{"label":"FeatureSetByRelationshipClass","detail":"FeatureSetByRelationshipClass(inputFeature, relationshipClass, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipClass(${1:inputFeature_}, ${2:relationshipClass_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the related records for a given feature based on the name of a given relationship class.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature from which to fetch related records.\n- **relationshipClass**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the relationship class as defined in the data source.\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to return in the FeatureSet. This list includes fields from both the relationship table and the input Feature.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to return the geometry for the resulting features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Attribute rules and relationship classes](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rules-and-relationship-classes.htm)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipname","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipname","description":"Returns the related records for a given feature as a FeatureSet.","examples":"\n**Example**\n\nReturns the sum of several fields across all related records\n\n```arcade\nvar results = FeatureSetByRelationshipName($feature, 'Election_Results', ['*'], false)\nSum(results, 'democrat + republican + other')\n```\n\n","completion":{"label":"FeatureSetByRelationshipName","detail":"FeatureSetByRelationshipName(inputFeature, relationshipName, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipName(${1:inputFeature_}, ${2:relationshipName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the related records for a given feature as a FeatureSet.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature for which to fetch related records.\n- **relationshipName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the relationship according to the feature service associated with the given feature.\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to return in the FeatureSet. This list includes fields from both the relationship table and the input Feature.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to return the geometry for the resulting features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"filter","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter","description":"Creates a new FeatureSet with all the features that pass the SQL92 expression filter.","examples":"\n**Examples**\n\nFilter features using a SQL92 expression\n\n```arcade\n// Returns all features with a Population greater than 10,000\nvar result = Filter($layer, 'POPULATION > 10000');\n```\n\nFilter features using a SQL92 expression with a variable substitute\n\n```arcade\n// Returns all features with a Population greater than the dataset average\nvar averageValue = Average($layer, 'POPULATION')\nvar result = Filter($layer, 'POPULATION > @averageValue');\n```\n\n","completion":{"label":"Filter","detail":"Filter(features, sqlExpression) -> FeatureSet","insertText":"Filter(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet with all the features that pass the SQL92 expression filter.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to filter.\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL92 expression used to filter features in the layer. This expression can substitute an Arcade variable using the `@` character. See the snippet below for an example.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filterbysubtypecode","bundle":"data-access","sinceVersion":"1.25","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filterbysubtypecode","description":"Creates a new FeatureSet with all the features matching the given subtype code.","examples":"\n**Example**\n\nFilter features with the subtype code\n\n```arcade\n// Returns all features that have the given subtype code\nFilterBySubtypeCode($layer, 5)\n```\n\n","completion":{"label":"FilterBySubtypeCode","detail":"FilterBySubtypeCode(features, subtypeCode) -> FeatureSet","insertText":"FilterBySubtypeCode(${1:features_}, ${2:subtypeCode_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.25](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet with all the features matching the given subtype code.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to filter.\n- **subtypeCode**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The subtype code used to filter features in the FeatureSet or layer.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#first","description":"Returns the first feature in a FeatureSet. Returns `null` if the FeatureSet is empty.","examples":"\n**Example**\n\nreturns the area of the first feature in the layer.\n\n```arcade\nArea( First($layer) )\n```\n\n","completion":{"label":"First","detail":"First(features) -> Feature","insertText":"First(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first feature in a FeatureSet. Returns `null` if the FeatureSet is empty.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to return the first feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"gdbversion","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#gdbversion","description":"Returns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.","examples":"\n**Example**\n\nReturns the geodatabase version of the given FeatureSet\n\n```arcade\nGdbVersion($layer)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(features) -> Text","insertText":"GdbVersion(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current geodatabase version.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getfeatureset","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeatureset","description":"Gets the FeatureSet in which the input feature belongs. The returned FeatureSet represents all features from the input feature's parent/root layer or table.","examples":"\n**Examples**\n\nReturns a FeatureSet representing all the features in the data source.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f)\n// returns a FeatureSet representing the data source, which does not include the map filter (2,000 features)\n```\n\nReturns the root FeatureSet of the feature.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'root')\n// returns the root FeatureSet, which honors the user's filter from the map (a total of 100 features)\n```\n\nReturns the parent FeatureSet of the feature.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'parent')\n// returns the parent FeatureSet, which is the result of the top function \n// (a total of 10 features)\n```\n\nReturns the number of features in the data source table within 1 mile of the feature.\n\n```arcade\nvar fullFeatureSet = GetFeatureSet($feature);\nvar featuresOneMile = Intersects(fullFeatureSet, BufferGeodetic($feature, 1, 'miles'))\nCount(featuresOneMile)\n```\n\n","completion":{"label":"GetFeatureSet","detail":"GetFeatureSet(inputFeature, source?) -> FeatureSet","insertText":"GetFeatureSet(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGets the FeatureSet in which the input feature belongs. The returned FeatureSet represents all features from the input feature's parent/root layer or table.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature belonging to a parent or root FeatureSet.\n- **source** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Indicates the source FeatureSet to return. \nPossible Values:\n\n - `datasource`: (default) Returns all the features from the input feature's data source without any filters or definition expressions as a FeatureSet. \n - `root`: Returns the initial FeatureSet to which the input feature belongs. This may be a filtered subset of all the features in the data source. \n - `parent`: Returns the parent FeatureSet of the input feature. This can be a smaller set of features than the original data source or root FeatureSet. \n\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getfeaturesetinfo","bundle":"data-access","sinceVersion":"1.18","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeaturesetinfo","description":"Returns metadata for the original source database and service (if applicable) of a FeatureSet.","examples":"\n**Examples**\n\nMetadata returned from a FeatureSet connected to an underlying feature service\n\n```arcade\n// $layer originates from a feature service layer in a web map\nGetFeatureSetInfo($layer);\n\n// returns the following: \n{\n \"layerId\": 7,\n \"layerName\": \"My Table\",\n \"itemId\": \"dda795cf2af44d2bb7af2827963b76e8\",\n \"serviceLayerUrl\": \"https://utilitynetwork.esri.com/server/rest/services/ClassicNapervilleElectric_Postgres/FeatureServer/100\",\n \"webMapLayerId\": 1,\n \"webMapLayerTitle\": \"MyTable1\",\n \"className\": null,\n \"objectClassId\": null\n}\n```\n\nMetadata returned from a FeatureSet originating from a filegdb or mobilegdb\n\n```arcade\n// $featureset originates from a feature class in a filegdb or mobilegdb\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n \"layerId\": null,\n \"layerName\": null,\n \"itemId\": null,\n \"serviceLayerUrl\": null,\n \"webMapLayerId\": null,\n \"webMapLayerTitle\": null,\n \"className\": \"myTable\",\n \"objectClassId\": 7\n}\n```\n\nMetadata returned from a FeatureSet connected to an sde workspace (client server direct connection)\n\n```arcade\n// Client server direct connection (sqlserver/oracle/etc.)\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n \"layerId\": null,\n \"layerName\": null,\n \"itemId\": null,\n \"serviceLayerUrl\": null,\n \"webMapLayerId\": null,\n \"webMapLayerTitle\": null,\n \"className\": \"owner.myTable\",\n \"objectClassId\": 7\n}\n```\n\n","completion":{"label":"GetFeatureSetInfo","detail":"GetFeatureSetInfo(inputFeatureSet) -> Dictionary","insertText":"GetFeatureSetInfo(${1:inputFeatureSet_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.18](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns metadata for the original source database and service (if applicable) of a FeatureSet.\n\n**Parameter**\n\n- **inputFeatureSet**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to fetch metadata.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **layerId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The layerId of the feature service. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **layerName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The layer name of the feature service. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The portal item ID of the feature service. Only applicable to FeatureSets created from feature services that have an associated portal item. This value will be `null` for sde/filegdb/mobile workspaces.\n- **serviceLayerUrl**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The url of the feature service layer. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **webMapLayerId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The layerId of the associated layer within the context of a web map. Only applicable to FeatureSets created from feature service layers that are contained within a web map. This value will be `null` for sde/filegdb/mobile workspaces.\n- **webMapLayerTitle**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The title of the associated layer within the context of a web map. Only applicable to FeatureSets created from feature service layers that are contained within a web map. This value will be `null` for sde/filegdb/mobile workspaces.\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the underlying feature class. Only applicable to FeatureSets created from feature classes in filegdb/mobile workspaces.\n- **objectClassId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The objectClassId. Only applicable to FeatureSets created from feature classes in filegdb workspaces."}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser1","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns information about the user \"tester\".\n\n```arcade\nGetUser($layer, \"tester\")\n// returns {\"id\": \"12\", \"username\": \"tester\", \"name\":\"Testy Tester\", \"email\": \"tester@example.com\", ...}\n```\n\nReturns username for the currently logged in user of the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nvar userInfo = GetUser($layer);\nif(HasValue(userInfo, \"username\")){\n return userInfo.username;\n}\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, username?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current user.\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the user you want to return. Only limited information will be returned based on your permissions when making the request.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc)."}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser2","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Example**\n\nReturns information about the user currently logged in based on the workspace connection from a layer with user extensions.\n\n```arcade\nGetUser($layer, true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, extensions?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current user.\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Determines if the `userLicenseTypeExtensions` will be returned in the dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the license type extensions associated with the user's account (e.g. \"Utility Network\", \"Parcel Fabric\", etc). The `extensions` parameter must be set to `true` in order for this to be returned."}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"groupby","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#groupby","description":"Returns statistics as a FeatureSet for a set of grouped or distinct values.","examples":"\n**Examples**\n\nReturns the count of each tree type\n\n```arcade\nvar treeStats = GroupBy($layer, 'TreeType', { name: 'NumTrees', expression: '1', statistic: 'COUNT' });\n// treeStats contains features with columns TreeType and NumTrees\n// Each unique tree type will have a count\n```\n\nReturns the count and the average height of each tree type\n\n```arcade\nvar treeStats = GroupBy($layer,\n [ // fields/expressions to group statistics by\n { name: 'Type', expression: 'TreeType'},\n { name: 'Status', expression: 'TreeStatus'}\n ], \n [ // statistics to return for each unique category\n { name: 'Total', expression: '1', statistic: 'COUNT' }, \n { name: 'AvgHeight', expression: 'Height', statistic: 'AVG' }, \n { name: 'MaxPercentCoverage', expression: 'CoverageRatio * 100', statistic: 'MAX' }\n ]\n);\n// treeStats contains features with columns Type, Status, Total, AvgHeight, MaxPercentCoverage\n// Each unique tree type (combination of type and status) will have a count, average height, and maximum value of percent coverage\n```\n\n","completion":{"label":"GroupBy","detail":"GroupBy(features, groupByFields, statistics) -> FeatureSet","insertText":"GroupBy(${1:features_}, ${2:groupByFields_}, ${3:statistics_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns statistics as a FeatureSet for a set of grouped or distinct values.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return statistics for unique values returned from a given set of fields and/or expressions.\n- **groupByFields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The field(s) and/or expression(s) from which to group statistics by unique values. This parameter can be a single field name, an array of field names, or an array of objects that specify column names paired with an expression (typically the field name) for the output FeatureSet. If an array of objects is specified, the following specification must be followed for each object:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given expression.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression from which to group statistics. This is typically a field name.\n- **statistics**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The summary statistics to calculate for each group. This parameter can be a dictionary or array of dictionary that specify output statistics to return for each group. The following specification must be used:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given statistical query in the output FeatureSet.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression or field name from which to query statistics.\n - **statistic**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The statistic type to query for the given field or expression. \nPossible Values: SUM \\| COUNT \\| MIN \\| MAX \\| AVG \\| STDEV \\| VAR\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"intersects","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#intersects","description":"Returns features from a FeatureSet that intersect another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that intersect the polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Intersects($layer, geom2) );\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(features, inputGeometry) -> FeatureSet","insertText":"Intersects(${1:features_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that intersect another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the intersects relationship to `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"length","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length","description":"Returns the length of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the planar length of the layer in meters\n\n```arcade\nLength($layer, 'meters')\n```\n\n","completion":{"label":"Length","detail":"Length(features, unit?) -> Number","insertText":"Length(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the length of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d","description":"Returns the planar (i.e. Cartesian) length of the input FeatureSet taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the 3D length of the layer's features in meters\n\n```arcade\nLength3D($layer, 'meters')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(features, unit?) -> Number","insertText":"Length3D(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (i.e. Cartesian) length of the input FeatureSet taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar length in 3D space.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic","description":"Returns the geodetic length of the input FeatureSet in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic length of the layer in meters\n\n```arcade\nLengthGeodetic($layer, 'meters')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(features, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic length of the input FeatureSet in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the geodetic length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic length calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"max","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#max","description":"Returns the highest value for a given numeric field from a FeatureSet.","examples":"\n**Examples**\n\nprints the max value of the population field for all features in the layer\n\n```arcade\nMax($layer, 'population')\n```\n\ncalculates the max population per square mile of all features in the layer\n\n```arcade\nMax($layer, 'population / area')\n```\n\n","completion":{"label":"Max","detail":"Max(features, fieldNameOrSQLExpression) -> Number","insertText":"Max(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the highest value for a given numeric field from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"mean","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#mean","description":"Returns the mean value of a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the difference between the feature's population and the mean population of all features in the layer\n\n```arcade\n$feature.population - Mean($layer, 'population')\n```\n\ncalculates the mean population per square mile of all features in the layer\n\n```arcade\nMean($layer, 'population / area')\n```\n\n","completion":{"label":"Mean","detail":"Mean(features, fieldNameOrSQLExpression) -> Number","insertText":"Mean(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to calculate the mean.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"min","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#min","description":"Returns the lowest value for a given numeric field from a FeatureSet.","examples":"\n**Examples**\n\nprints the min value of the population field for all features in the layer\n\n```arcade\nMin($layer, 'population')\n```\n\nreturns the minimum population per square mile of all features in the layer\n\n```arcade\nMin($layer, 'population / area')\n```\n\n","completion":{"label":"Min","detail":"Min(features, fieldNameOrSQLExpression) -> Number","insertText":"Min(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value for a given numeric field from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"orderby","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#orderby","description":"Orders a FeatureSet by using a SQL92 OrderBy clause.","examples":"\n**Examples**\n\nOrder features by population where features with the highest population are listed first\n\n```arcade\nOrderBy($layer, 'POPULATION DESC')\n```\n\nOrder features by rank in ascending order\n\n```arcade\nOrderBy($layer, 'Rank ASC')\n```\n\n","completion":{"label":"OrderBy","detail":"OrderBy(features, sqlExpression) -> FeatureSet","insertText":"OrderBy(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nOrders a FeatureSet by using a SQL92 OrderBy clause.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to order.\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL92 expression used to order features in the layer.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"overlaps","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#overlaps","description":"Returns features from a FeatureSet that overlap another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that overlap the polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Overlaps($layer, geom2) );\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(overlappingFeatures, inputGeometry) -> FeatureSet","insertText":"Overlaps(${1:overlappingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that overlap another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **overlappingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features that are tested for the 'overlaps' relationship with `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'overlaps' relationship with `overlappingFeatures`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#schema","description":"Returns the schema description of the provided FeatureSet.","examples":"","completion":{"label":"Schema","detail":"Schema(features) -> Dictionary","insertText":"Schema(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the schema description of the provided FeatureSet.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet whose schema to return.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The objectId field of the FeatureSet.\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The global ID field of the FeatureSet. Returns `\"\"` if not globalId-enabled.\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The geometry type of features in the FeatureSet. Returns `esriGeometryNull` for tables with no geometry. \nPossible values: `esriGeometryPoint`, `esriGeometryLine`, `esriGeometryPolygon`, `esriGeometryNull`\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Returns an array of dictionaries describing the fields in the FeatureSet. Each dictionary describes the field `name`, `alias`, `type`, `subtype`, `domain`, `length`, and whether it is `editable` and `nullable`."}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#stdev","description":"Returns the sample standard deviation for the values from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\nprints the standard deviation of values from the 'population' field\n\n```arcade\nStdev($layer, 'population')\n```\n\ncalculates the standard deviation of the population per square mile of all features in the layer\n\n```arcade\nStdev($layer, 'population / area')\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(features, fieldNameOrSQLExpression) -> Number","insertText":"Stdev(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sample standard deviation for the values from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"subtypes","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#subtypes","description":"Returns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.","examples":"\n**Example**\n\nReturns subtypes with coded values from a FeatureSet\n\n```arcade\nvar fsTransformer = FeatureSetByName($layer, \"Transformer\")\nSubtypes(fsTransformer)\n// returns the following dictionary\n// {\n// subtypeField: 'assetGroup',\n// subtypes: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Single Phase\", code: 1 },\n// { name: \"Two Phase\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(features) -> Dictionary","insertText":"Subtypes(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to get subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field containing a subtype.\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries describing the subtypes. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#sum","description":"Returns the sum of values returned from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the population of the current feature as a % of the total population of all features in the layer\n\n```arcade\n( $feature.population / Sum($layer, 'population') ) * 100\n```\n\ncalculates the total number of votes cast in an election for the entire dataset\n\n```arcade\nSum($layer, 'democrat + republican + other')\n```\n\n","completion":{"label":"Sum","detail":"Sum(features, fieldNameOrSQLExpression) -> Number","insertText":"Sum(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of values returned from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"top","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#top","description":"Truncates the FeatureSet and returns the first given number of features.","examples":"\n**Example**\n\nReturns the top 5 features with the highest population\n\n```arcade\nTop( OrderBy($layer, 'POPULATION DESC'), 5 )\n```\n\n","completion":{"label":"Top","detail":"Top(features, numItems) -> FeatureSet","insertText":"Top(${1:features_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTruncates the FeatureSet and returns the first given number of features.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet to truncate.\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features to return from the beginning of the FeatureSet.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#touches","description":"Returns features from a FeatureSet that touch another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the layer that touch the geometry.\n\n```arcade\nvar geom = Polygon({ ... });\nCount( Touches($layer, geom) );\n```\n\n","completion":{"label":"Touches","detail":"Touches(touchingFeatures, inputGeometry) -> FeatureSet","insertText":"Touches(${1:touchingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that touch another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **touchingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features to test the 'touches' relationship with `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `touchingFeatures`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"variance","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#variance","description":"Returns the variance of the values from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\nprints the variance for the population field in the given layer\n\n```arcade\nVariance($layer, 'population')\n```\n\ncalculates the variance of the population per square mile of all features in the layer\n\n```arcade\nVariance($layer, 'population / area')\n```\n\n","completion":{"label":"Variance","detail":"Variance(features, fieldNameOrSQLExpression) -> Number","insertText":"Variance(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance of the values from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"within","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#within","description":"Returns features from a FeatureSet that contain the `innerGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the layer within the polygon\n\n```arcade\nvar outerGeom = Polygon({ ... });\nCount( Within(outerGeom, $layer) );\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerFeatures) -> FeatureSet","insertText":"Within(${1:innerGeometry_}, ${2:outerFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that contain the `innerGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'within' relationship to `outerFeatures`.\n- **outerFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The comparison features that are tested for the 'contains' relationship to `innerGeometry`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"geometry_functions","title":"Geometry functions","items":[[{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle1","description":"Returns the arithmetic angle of a line between two points in degrees (0 - 360). The angle is measured in a counter-clockwise direction relative to east. For example, an angle of 90 degrees points due north.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or both Point geometries. _If the points are identical, then an angle of 0 degrees is returned._","examples":"\n**Example**\n\nReturns the angle from a Point to a Feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arithmetic angle of a line between two points in degrees (0 - 360). The angle is measured in a counter-clockwise direction relative to east. For example, an angle of 90 degrees points due north.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or both Point geometries. _If the points are identical, then an angle of 0 degrees is returned._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first Point or Feature used to calculate the angle.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second Point or Feature used to calculate the angle.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle2","description":"Returns the arithmetic angle of a line between three points in degrees (0 - 360). The angle is measured around `pointB` in a counter-clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._","examples":"\n**Example**\n\nReturns the angle between two points around the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature, pointC)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB, pointC) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arithmetic angle of a line between three points in degrees (0 - 360). The angle is measured around `pointB` in a counter-clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first Point or Feature used to calculate the angle.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second Point or Feature used to calculate the angle.\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The third Point or Feature used to calculate the angle.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"area","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area","description":"Returns the area of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the feature in square meters\n\n```arcade\nArea($feature, 'square-meters')\n```\n\n","completion":{"label":"Area","detail":"Area(polygon, unit?) -> Number","insertText":"Area(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the area of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The Polygon or Feature for which to calculate the planar area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic","description":"Returns the geodetic area of the input geometry or Feature in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic area of the feature in square meters\n\n```arcade\nAreaGeodetic($feature, 'square-meters')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(polygon, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic area of the input geometry or Feature in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The Polygon or Feature for which to calculate the geodetic area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic area calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},[{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing1","description":"Returns the geographic angle of a line between two points in degrees (0 - 360). The bearing is measured in a clockwise direction relative to north. For example, a bearing of 225 degrees represents a southwest orientation.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or both Point geometries. _If the points are identical, then an angle of 0 is returned._","examples":"\n**Example**\n\nReturns the bearing from a point to the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geographic angle of a line between two points in degrees (0 - 360). The bearing is measured in a clockwise direction relative to north. For example, a bearing of 225 degrees represents a southwest orientation.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or both Point geometries. _If the points are identical, then an angle of 0 is returned._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first point used to calculate the bearing.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second point used to calculate the bearing.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing2","description":"Returns the geographic angle of a line between three points in degrees (0 - 360). The bearing is measured around `pointB` in a clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._","examples":"\n**Example**\n\nReturns the bearing between two points around the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature,pointC)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB, pointC) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geographic angle of a line between three points in degrees (0 - 360). The bearing is measured around `pointB` in a clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first point used to calculate the bearing.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second point used to calculate the bearing.\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The third point used to calculate the bearing.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"buffer","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer","description":"Returns the planar (or Euclidean) buffer at a specified distance around the input geometry. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a polygon representing a 1/2-mile buffer around the input geometry\n\n```arcade\nBuffer($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"Buffer","detail":"Buffer(inputGeometry, distance, unit?) -> Polygon","insertText":"Buffer(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (or Euclidean) buffer at a specified distance around the input geometry. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to buffer.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance to buffer from the geometry.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the buffer `distance`. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [BufferGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"buffergeodetic","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic","description":"Returns the geodetic buffer at a specified distance around the input geometry. This is a geodetic measurement, which calculates distances on an ellipsoid.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns a polygon representing a 1/2-mile buffer around the input geometry\n\n```arcade\nBufferGeodetic($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"BufferGeodetic","detail":"BufferGeodetic(inputGeometry, distance, unit?, curveType?) -> Polygon","insertText":"BufferGeodetic(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic buffer at a specified distance around the input geometry. This is a geodetic measurement, which calculates distances on an ellipsoid.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to buffer.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance to buffer from the geometry.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the buffer `distance`. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic buffer calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Buffer()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"centroid","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#centroid","description":"Returns the centroid of the input geometry.","examples":"\n**Examples**\n\nReturns the centroid of the given polygon\n\n```arcade\nCentroid($feature)\n```\n\nReturns the centroid of the given polygon ring\n\n```arcade\nvar ringPoints = Geometry($feature).rings[0];\nCentroid(ringPoints);\n```\n\nReturns the centroid of the given polygon or polyline and ensures it is within the input geometry\n\n```arcade\nCentroid($feature, 'labelPoint')\n```\n\n","completion":{"label":"Centroid","detail":"Centroid(polygon, algorithm?) -> Point","insertText":"Centroid(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the centroid of the input geometry.\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The polygon or array of points composing a polygon.\n- **algorithm** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.29_ The method determining the position of the centroid. Possible values:\n\n - `geometric`: (default) Returns the true centroid of the geometry. The geometric centroid for an array of points will return the mean of all the points, whereas for polygons, the geometric centroid is representative of the shape's area. For irregular polygons, the geometric centroid may not be within the polygon itself. For polylines, the geometric centroid may not be on the line itself.\n\n - `labelPoint`: For polygons, ensures the centroid returned from this function is within the polygon itself. For polylines, ensures the centroid is on the line itself.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"clip","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#clip","description":"Calculates the clipped geometry from a target geometry by an envelope.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the clipped geometry\n\n```arcade\nvar envelope = Extent({ ... });\nArea(Clip($feature, envelope), 'square-miles');\n```\n\n","completion":{"label":"Clip","detail":"Clip(inputGeometry, envelope) -> Geometry","insertText":"Clip(${1:inputGeometry_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the clipped geometry from a target geometry by an envelope.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to be clipped.\n- **envelope**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent) - The envelope used to clip the `geometry`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#contains","description":"Indicates if one geometry contains another geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\nReturns true if the feature is contained within the given polygon\n\n```arcade\nvar container = Polygon({ ... });\nContains(containerGeometry, $feature);\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideGeometry) -> Boolean","insertText":"Contains(${1:containerGeometry_}, ${2:insideGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry contains another geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'contains' relationship to `insideGeometry`. Think of this geometry as the potential 'container' of the `insideGeometry`.\n- **insideGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'within' relationship to the `containerGeometry`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"convertdirection","bundle":"geometry","sinceVersion":"1.13","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convertdirection","description":"Angles can have several interpretations and can be represented as a number, a text, or a well formed array. This function takes one input representation and converts it to another.\n\nThe input value is described by a dictionary that specified the type of angle and the type of direction. If the `angleType` and `directionType` are not appropriate for the input, then the conversion will fail.\n\nThe desired output value is described by a dictionary that specifies output type, angle type, direction type, and an optional format for text output.\n\nIf the output type is `value`: \n - an array will be returned for angle type `dms` or for direction type `quadrant` \n - a number will be returned for all the other cases\n\nIf the output type is `text`, then default padding and delimiters will be used unless the optional`format` property is provided. \n`format` controls order, spacing, padding, and delimiters in the output text. \nStrings of format specifier characters before a decimal point indicate minimum padding (e.g. `DDD -> 000`). \nStrings of format characters after a decimal point indicate precision (e.g. `D.DD -> 0.00`).\n\nSupported `format` characters: \n- `D` - Degrees \n- `R` - Radians \n- `G` - Gradians \n- `d` - DMS Degrees \n- `m` - DMS Minutes \n- `s` - DMS Seconds \n- `P` - Long Meridian (e.g. `North` vs. `South`) \n- `p` - Short Meridian (e.g. `N` vs. `S`) \n- `B` - Long direction (e.g. `East` vs. `West`) \n- `b` - Short direction (e.g. `E` vs. `W`) \n- `[ ]` - Escape characters \n\n\nFor `dms` formatting, if the `s` is not used then `m` will round to the nearest minute. Similarly, if `m` is not used then `d` will round.","examples":"\n**Examples**\n\nExamples where the `outputType` is `value`.\n\n```arcade\nConvertDirection( 30, {directionType:'North', angleType: 'Degrees'}, {directionType:'Quadrant', angleType: 'DMS', outputType: 'value'})\n// returns ['N', 30, 0, 0, 'E']\n \nConvertDirection( 25.99, {directionType:'North', angleType : 'Gradians'}, {directionType:'North', outputType: 'value', angleType : 'Gradians'})\n// returns 25.99\n \nConvertDirection( 1, {directionType:'North', angleType: 'DEGREES'}, {directionType: 'Quadrant', angleType: 'Degrees', outputType: 'value'})\n// returns ['N',1,'E']\n \nConvertDirection( 0.9, {directionType: 'North', angleType: 'degrees'}, {directionType:'North', angleType: 'gradians', outputType: 'value'})\n// returns 1.0 \n \nConvertDirection( 180.0, {directionType:'North', angleType: 'degrees'}, {directionType:'North', angleType: 'radians', outputType : 'value'})\n// returns PI\n```\n\nExamples where `outputType` is `text`.\n\n```arcade\nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'DDDD.D'})\n// returns '0025.3'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'R'})\n// returns '0'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: '[DD.DD]'})\n// returns 'DD.DD'\n \nConvertDirection( 25.34, {directionType:'North', angleType: 'DEGREES'}, {directionType:'quadrant', outputType: 'text', format: 'P B'})\n// returns 'North East'\n \nConvertDirection( [001,01,59.99], {directionType:'North', angleType: 'DMS'}, {directionType:'North', angleType: 'DMS', outputType: 'text', format: 'dddA mm[B] ssC'})\n// returns '001A 02B 00C'\n```\n\n","completion":{"label":"ConvertDirection","detail":"ConvertDirection(input, inputSpec, outputSpec) -> Array<Number|Text>,Number,Text","insertText":"ConvertDirection(${1:input_}, ${2:inputSpec_}, ${3:outputSpec_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.13](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAngles can have several interpretations and can be represented as a number, a text, or a well formed array. This function takes one input representation and converts it to another.\n\nThe input value is described by a dictionary that specified the type of angle and the type of direction. If the `angleType` and `directionType` are not appropriate for the input, then the conversion will fail.\n\nThe desired output value is described by a dictionary that specifies output type, angle type, direction type, and an optional format for text output.\n\nIf the output type is `value`: \n - an array will be returned for angle type `dms` or for direction type `quadrant` \n - a number will be returned for all the other cases\n\nIf the output type is `text`, then default padding and delimiters will be used unless the optional`format` property is provided. \n`format` controls order, spacing, padding, and delimiters in the output text. \nStrings of format specifier characters before a decimal point indicate minimum padding (e.g. `DDD -> 000`). \nStrings of format characters after a decimal point indicate precision (e.g. `D.DD -> 0.00`).\n\nSupported `format` characters: \n- `D` - Degrees \n- `R` - Radians \n- `G` - Gradians \n- `d` - DMS Degrees \n- `m` - DMS Minutes \n- `s` - DMS Seconds \n- `P` - Long Meridian (e.g. `North` vs. `South`) \n- `p` - Short Meridian (e.g. `N` vs. `S`) \n- `B` - Long direction (e.g. `East` vs. `West`) \n- `b` - Short direction (e.g. `E` vs. `W`) \n- `[ ]` - Escape characters \n\n\nFor `dms` formatting, if the `s` is not used then `m` will round to the nearest minute. Similarly, if `m` is not used then `d` will round.\n\n**Parameters**\n\n- **input**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A raw representation of the bearing. The type of `input` and the values of the `inputSpec` dictate how the input is parsed.\n- **inputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Contains information about how to interpret input.\n\n - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the input angle unit. Supported Values: `DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the input bearing's meridian and direction. Supported Values: `NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n- **outputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Contains information about how to format the output.\n\n - **outputType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Controls output type. Supported Values: `value`, `text`\n - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the output angle unit. Supported Values: `DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the output bearing's meridian and direction. Supported Values: `NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n - **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Controls text formatting. Only applicable if `outputType` is `text`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"convexhull","bundle":"geometry","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convexhull","description":"Calculates the convex hull of a geometry. A convex hull is the smallest convex polygon that encloses a geometry. The hull is typically a polygon but can also be a polyline or a point in degenerate cases.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Examples**\n\nReturns the number of vertices in the convex hull geometry of the current feature's geometry\n\n```arcade\nCount(ConvexHull(Geometry($feature)).Rings[0])\n```\n\nReturns the convex hull of a geometry which has a concave region (which the convex hull will ignore)\n\n```arcade\nvar pacman_like_shape = Polygon({\n \"rings\": [[[1, 2], [2, 0], [1, -2], [-1, -2], [-2, -1], [-1, -1.5], [0, -1.5], [-2, 1], [-1, 2]]],\n \"spatialReference\": { \"wkid\": 3857 }\n});\nreturn ConvexHull(pacman_like_shape).rings[0];\n// Returns the geometry [[1,2],[2,0],[1,-2],[-1,-2],[-2,-1],[-2,1],[-1,2],[1,2]]\n```\n\n","completion":{"label":"ConvexHull","detail":"ConvexHull(inputGeometry) -> Geometry","insertText":"ConvexHull(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the convex hull of a geometry. A convex hull is the smallest convex polygon that encloses a geometry. The hull is typically a polygon but can also be a polyline or a point in degenerate cases.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point, line, or polygon geometry to be analyzed.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#crosses","description":"Indicates if one geometry crosses another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the feature crosses the given polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCrosses($feature, geom2);\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(geometry1, geometry2) -> Boolean","insertText":"Crosses(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry crosses another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to cross.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being crossed.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"cut","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#cut","description":"Splits the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all resulting left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry. Each undefined cut, along with any uncut parts, are output as separate Polylines.\n\nFor Polygons, all resulting left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nCuts the feature's geometry with the given polyline\n\n```arcade\nvar cutter = Polyline({ ... });\nCut($feature, cutter));\n```\n\n","completion":{"label":"Cut","detail":"Cut(polylineOrPolygon, cutter) -> Array<Geometry>","insertText":"Cut(${1:polylineOrPolygon_}, ${2:cutter_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSplits the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all resulting left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry. Each undefined cut, along with any uncut parts, are output as separate Polylines.\n\nFor Polygons, all resulting left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **polylineOrPolygon**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to cut.\n- **cutter**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Polyline used to cut the `geometry`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue1","description":"Returns a specified default value if a key in a geometry does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nPoint that has a z-value\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is true\n// returns the value of Geometry($feature).z\n```\n\nPoint that does not have a z-value\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is false\n// returns 1000\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a key in a geometry does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The input geometry to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the key does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue2","description":"Returns a specified default value if at least one of the keys in a geometry's nested properties does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nRing, coordinate, and x value all exist and have a value\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"z\"], 1000)\n// returns 100\n```\n\nRing does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",2,0,\"z\"], 1000)\n// returns 1000\n```\n\nRing and coordinate exist, but m-value does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"m\"], 100)\n// returns 100\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if at least one of the keys in a geometry's nested properties does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The input geometry to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"densify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify","description":"Densifies geometries by inserting vertices to create segments no longer than the specified interval.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the densified geometry with a maximum segment length of 10 m\n\n```arcade\nvar maxLength = 10;\nDensify($feature, maxLength, 'meters');\n```\n\n","completion":{"label":"Densify","detail":"Densify(inputGeometry, maxSegmentLength, unit?) -> Geometry","insertText":"Densify(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDensifies geometries by inserting vertices to create segments no longer than the specified interval.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be densified.\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum segment length allowed. Must be a positive value.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [DensifyGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"densifygeodetic","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic","description":"Creates a geodesic between each of the input geometry's vertices and densifies the output geometry with additional vertices to create segments no longer than the specified interval.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the densified geometry with a maximum segment length of 10000\n\n```arcade\nDensifyGeodetic($feature, 10000, 'meters');\n```\n\n","completion":{"label":"DensifyGeodetic","detail":"DensifyGeodetic(inputGeometry, maxSegmentLength, unit?, curveType?) -> Geometry","insertText":"DensifyGeodetic(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a geodesic between each of the input geometry's vertices and densifies the output geometry with additional vertices to create segments no longer than the specified interval.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be densified.\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum segment length allowed. Must be a positive value.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic densify calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [Densify()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"difference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#difference","description":"Performs the topological difference operation for the two geometries. The resultant geometry comes from `inputGeometry`, not the `subtractor`. The dimension of `subtractor` has to be equal to or greater than that of `inputGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nSubtracts the given polygon area from the feature.\n\n```arcade\nvar subtractor = Polygon({ ... });\nDifference($feature, subtractor);\n```\n\n","completion":{"label":"Difference","detail":"Difference(inputGeometry, subtractor) -> Geometry","insertText":"Difference(${1:inputGeometry_}, ${2:subtractor_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the topological difference operation for the two geometries. The resultant geometry comes from `inputGeometry`, not the `subtractor`. The dimension of `subtractor` has to be equal to or greater than that of `inputGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry from which to subtract.\n- **subtractor**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to subtract from `geometry`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"disjoint","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#disjoint","description":"Indicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries don't intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nDisjoint($feature, geom2);\n```\n\n","completion":{"label":"Disjoint","detail":"Disjoint(geometry1, geometry2) -> Boolean","insertText":"Disjoint(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'disjoint' relationship to `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'disjoint' relationship to `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Disjoint](https://esri.github.io/geometry-api-java/doc/Disjoint.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distance","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance","description":"Returns the planar distance between two geometries in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the distance between two geometries in meters\n\n```arcade\nvar geom2 = Point({ ... });\nDistance($feature, geom2, 'meters')\n```\n\n","completion":{"label":"Distance","detail":"Distance(geometry1, geometry2, unit?) -> Number","insertText":"Distance(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar distance between two geometries in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry used to measure the distance from `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry used to measure the distance from `geometry1`.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [DistanceGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"distancegeodetic","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic","description":"Calculates the shortest distance between two points along a great circle.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the distance from a bus in a stream layer to the central station in kilometers\n\n```arcade\nvar unionStation = Point({\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }});\ndistanceGeodetic($feature, unionStation, 'kilometers');\n```\n\n","completion":{"label":"DistanceGeodetic","detail":"DistanceGeodetic(point1, point2, unit?, curveType?) -> Number","insertText":"DistanceGeodetic(${1:point1_}, ${2:point2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the shortest distance between two points along a great circle.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **point1**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point used to measure the distance from `point2`.\n- **point2**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point used to measure the distance from `point1`.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic distance calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Distance()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"distancetocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancetocoordinate","description":"Returns a coordinate along an input line based on a given distance. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. If the distance is not found along the input line, then the result will be `null`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the coordinate of the input polyline based on the given distance value\n\n```arcade\nvar result = DistanceToCoordinate($feature, 1038);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"DistanceToCoordinate","detail":"DistanceToCoordinate(inputLine, inputDistance) -> Dictionary","insertText":"DistanceToCoordinate(${1:inputLine_}, ${2:inputDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a coordinate along an input line based on a given distance. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. If the distance is not found along the input line, then the result will be `null`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to find a coordinate. When using a Feature as input, the feature's geometry must be a polyline.\n- **inputDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance used to find the coordinate along `inputLine` from the start of the line. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. \n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties. If the distance is not found along the input line, then the result will be `null`.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The coordinates of a point along `inputLine` based on the given distance value.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"envelopeintersects","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#envelopeintersects","description":"Indicates if the envelope (or extent) of one geometry intersects the envelope of another geometry. In the graphic below, the red highlight indicates the scenarios where the function will return `true`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nEnvelopeIntersects($feature, geom2);\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(geometry1, geometry2) -> Boolean","insertText":"EnvelopeIntersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the envelope (or extent) of one geometry intersects the envelope of another geometry. In the graphic below, the red highlight indicates the scenarios where the function will return `true`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the intersects relationship to the other geometry.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#equals","description":"Indicates if two geometries are equal, or geographically equivalent given the spatial reference and tolerance of the data. The two input geometries don't have to be clones to be considered equal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `Geometry($feature)`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries are equal\n\n```arcade\nvar geom2 = Point({ ... });\nEquals(Geometry($feature), geom2);\n```\n\n","completion":{"label":"Equals","detail":"Equals(geometry1, geometry2) -> Boolean","insertText":"Equals(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if two geometries are equal, or geographically equivalent given the spatial reference and tolerance of the data. The two input geometries don't have to be clones to be considered equal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `Geometry($feature)`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The first input geometry.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The second input geometry.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Equals](https://esri.github.io/geometry-api-java/doc/Equals.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent1","description":"Constructs an Extent object from a dictionary.","examples":"\n**Example**\n\nCreates an Extent object\n\n```arcade\nExtent({\n xMax: -95.34,\n xMin: -97.06138,\n yMax: 32.837,\n yMin: 12.003,\n hasM: false,\n hasZ: false,\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Extent","detail":"Extent(geometryDefinition) -> Extent","insertText":"Extent(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs an Extent object from a dictionary.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Extent geometry object.\n\n - **xMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible x-coordinate of the geometry.\n - **xMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible x-coordinate of the geometry.\n - **yMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible y-coordinate of the geometry.\n - **yMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible y-coordinate of the geometry.\n - **mMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible m-value of the geometry. If setting this value, then you must set `hasM` to `true`.\n - **mMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible m-value of the geometry. If setting this value, then you must set `hasM` to `true`.\n - **zMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible z-value of the geometry. If setting this value, then you must set `hasZ` to `true`.\n - **zMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible z-value of the geometry. If setting this value, then you must set `hasZ` to `true`.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent2","description":"Returns the extent of an input Feature, Polygon, Point, Polyline or Multipoint.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the extent of a feature\n\n```arcade\nExtent($feature);\n```\n\n","completion":{"label":"Extent","detail":"Extent(inputGeometry) -> Extent","insertText":"Extent(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the extent of an input Feature, Polygon, Point, Polyline or Multipoint.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature or Geometry from which to get an extent.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent3","description":"Constructs an Extent object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Envelope objects.","examples":"\n**Example**\n\nCreates an Extent object from JSON\n\n```arcade\nvar extentJSON = '{\"xmin\": -109.55, \"ymin\": 25.76, \"xmax\": -86.39, \"ymax\": 49.94, \"spatialReference\": { \"wkid\": 3857 }}';\nExtent(extentJSON);\n```\n\n","completion":{"label":"Extent","detail":"Extent(jsonDefinition) -> Extent","insertText":"Extent(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs an Extent object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Envelope objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text from which to construct the extent object.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Envelope objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#ENVELOPE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"generalize","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#generalize","description":"Reduces the number of vertices in the input geometry based on a given deviation value. Point and Multipoint geometries are left unchanged. Envelopes are converted to Polygons and then generalized.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a generalized version of the input geometry\n\n```arcade\n// Removes vertices so segments are no more than 100 meters from the original geometry\nGeneralize($feature, 100, true, 'meters')\n```\n\n","completion":{"label":"Generalize","detail":"Generalize(inputGeometry, maxDeviation, removeDegenerateParts?, maxDeviationUnit?) -> Geometry","insertText":"Generalize(${1:inputGeometry_}, ${2:maxDeviation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReduces the number of vertices in the input geometry based on a given deviation value. Point and Multipoint geometries are left unchanged. Envelopes are converted to Polygons and then generalized.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be generalized.\n- **maxDeviation**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum allowed deviation from the generalized geometry to the original geometry.\n- **removeDegenerateParts** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - When `true` the degenerate parts of the geometry will be removed from the output (may be undesired for drawing).\n- **maxDeviationUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxDeviation. Defaults to the units of the input geometry. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"geometry","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#geometry","description":"Constructs a Geometry object from serialized JSON text or a dictionary. The JSON schema must follow the ArcGIS REST API JSON specification for Geometry objects. This function may also return the Geometry of an input feature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Examples**\n\nReturns the geometry of the feature\n\n```arcade\nGeometry($feature)\n```\n\nConstructs a point geometry. This can be done with any geometry type.\n\n```arcade\nvar pointJSON = {\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 } };\nGeometry(pointJSON);\n```\n\n","completion":{"label":"Geometry","detail":"Geometry(inputFeature) -> Geometry","insertText":"Geometry(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Geometry object from serialized JSON text or a dictionary. The JSON schema must follow the ArcGIS REST API JSON specification for Geometry objects. This function may also return the Geometry of an input feature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Feature or JSON from which to construct the geometry object. Starting at version 1.25, the input JSON text or dictionary definitions for Polygons or Polylines may contain curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Geometry objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm)\n"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue1","description":"Indicates whether a geometry has a value at a given key or index.","examples":"\n**Examples**\n\nPoint that has a z value\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Point\"){\n return HasValue(Geometry($feature), \"z\")\n // returns true\n}\n```\n\nPolygon with key that does not exist\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Polygon\"){\n return HasValue(Geometry($feature), \"verticalCoordinateSystem\")\n // returns false\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, key) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a geometry has a value at a given key or index.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key or property name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue2","description":"Checks whether a property or index nested several levels deep in a geometry has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nRing, coordinate, and x value all exist and have a value\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,0,\"x\"])){\n // if() evaluates to true, thus executing the return\n return shape.rings[0][0].x;\n // returns -97.06138\n}\n```\n\nRing does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",2,0,\"x\"])){\n // if() evaluates to false, thus not executing the return\n return shape.rings[2][0].x;\n // polygon only has one ring; there is not a third ring\n}\n```\n\nRing and coordinate exist, but m value does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,3,\"m\"])){\n // if() evaluates to false, thus not executing the return\n return shape.rings[0][3].m;\n // there is a coordinate at this location, but it does not have an m value\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, keys) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether a property or index nested several levels deep in a geometry has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"intersection","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersection","description":"Constructs the set-theoretic intersection between two geometries and returns a new geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area common to both polygons\n\n```arcade\nvar geom2 = Polygon({ ... });\nArea(Intersection($feature, geom2), 'square-miles');\n```\n\n","completion":{"label":"Intersection","detail":"Intersection(geometry1, geometry2) -> Geometry","insertText":"Intersection(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic intersection between two geometries and returns a new geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to intersect with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to intersect with `geometry1`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"intersects","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersects","description":"Indicates if one geometry intersects another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nIntersects($feature, geom2);\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(geometry1, geometry2) -> Boolean","insertText":"Intersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry intersects another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the intersects relationship to `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"isselfintersecting","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#isselfintersecting","description":"Indicates whether the input geometry has rings, paths, or points that intersect or cross other parts of the geometry. For example, a single polyline feature whose paths intersect each other or a polygon with rings that self intersect would return `true`. ","examples":"\n**Example**\n\nReturns true if the polyline's paths intersect each other\n\n```arcade\nvar polyline = Polyline({ ... });\nIsSelfIntersecting(polyline);\n```\n\n","completion":{"label":"IsSelfIntersecting","detail":"IsSelfIntersecting(inputGeometry) -> Boolean","insertText":"IsSelfIntersecting(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the input geometry has rings, paths, or points that intersect or cross other parts of the geometry. For example, a single polyline feature whose paths intersect each other or a polygon with rings that self intersect would return `true`. \n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The polygon, polyline, or multipoint geometry to test for the self intersection.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"issimple","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#issimple","description":"Indicates if the given geometry is topologically simple.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometry is topologically simple\n\n```arcade\nIsSimple($feature);\n```\n\n","completion":{"label":"IsSimple","detail":"IsSimple(inputGeometry) -> Boolean","insertText":"IsSimple(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the given geometry is topologically simple.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"length","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length","description":"Returns the length of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the planar length of the feature in kilometers\n\n```arcade\nLength($feature, 'kilometers')\n```\n\n","completion":{"label":"Length","detail":"Length(inputGeometry, unit?) -> Number","insertText":"Length(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the length of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry or geometries for which to calculate the planar length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"geometry","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d","description":"Returns the planar (i.e. Cartesian) length of the input geometry or Feature taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Examples**\n\nReturns the 3D planar length of the feature in the unit of the spatial reference of the context executing the expression.\n\n```arcade\nLength3D($feature)\n```\n\nReturns the 3D planar length of the feature in feet.\n\n```arcade\nLength3D($feature, 'feet')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(inputGeometry, unit?) -> Number","insertText":"Length3D(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (i.e. Cartesian) length of the input geometry or Feature taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry or Feature for which to calculate the planar length in 3D space.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic","description":"Returns the geodetic length of the input geometry or Feature in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic length of the feature in kilometers\n\n```arcade\nLengthGeodetic($feature, 'kilometers')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(inputGeometry, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic length of the input geometry or Feature in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry for which to calculate the geodetic length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic length calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"measuretocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#measuretocoordinate","description":"Returns the first coordinate along an input line based on a given measure, or m-value. If the measure is not found along the input line, then the result will be `null`. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the coordinate of the input polyline based on the given measure value\n\n```arcade\nvar result = MeasureToCoordinate(Geometry($feature), 110);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"MeasureToCoordinate","detail":"MeasureToCoordinate(inputLine, inputMeasure) -> Dictionary","insertText":"MeasureToCoordinate(${1:inputLine_}, ${2:inputMeasure_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first coordinate along an input line based on a given measure, or m-value. If the measure is not found along the input line, then the result will be `null`. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to find a coordinate. The input line must have `hasM` equal to `true`. If `hasM` is `false`, then `null` will be returned. When using a Feature as input, the feature's geometry must be a polyline.\n- **inputMeasure**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The measure, or m-value, from which to find a coordinate along `inputLine` from the start of the line. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties. If the measure is not found along the input line, then the result will be `null`.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The first coordinate of a point along `inputLine` based on the given measure value.\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the start of the `inputLine` measured along the line to the `coordinate`. In polylines where paths do not connect, the `distanceAlong` value does not include the distance of the gaps between the starting and ending vertices of the paths.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"multiparttosinglepart","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multiparttosinglepart","description":"Converts a multi-part geometry into separate geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns an array of single-part geometries from a multi-part geometry\n\n```arcade\nvar allParts = MultiPartToSinglePart($feature)\n```\n\n","completion":{"label":"MultiPartToSinglePart","detail":"MultiPartToSinglePart(inputGeometry) -> Array<Geometry>","insertText":"MultiPartToSinglePart(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a multi-part geometry into separate geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The multi-part geometry to break into single parts.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint1","description":"Constructs a Multipoint object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a Multipoint with only x, y coordinates\n\n```arcade\nMultipoint({\n points: [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832],\n [-97.06138,32.837]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with m values\n\n```arcade\nMultipoint({\n hasM: true,\n points: [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50],\n [-97.06138,32.837,0]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with z values\n\n```arcade\nMultipoint({\n hasZ: true,\n points: [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500],\n [-97.06138,32.837,1000]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with z and m values\n\n```arcade\nMultipoint({\n hasM: true,\n hasZ: true,\n points: [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50],\n [-97.06138,32.837,1000,0]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Multipoint object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Multipoint geometry object.\n\n - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of coordinates representing point locations.\n\n - **singlePoint**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single point or coordinate. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint2","description":"Constructs a Multipoint object from a dictionary using an array of Point objects.","examples":"\n**Example**\n\nCreates a Multipoint with only x, y coordinates\n\n```arcade\nMultipoint({\n points: [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Multipoint object from a dictionary using an array of Point objects.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Multipoint geometry object.\n\n - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of point objects.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint3","description":"Constructs a Multipoint object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Multipoint objects.","examples":"\n**Example**\n\n```arcade\n// Creates a Multipoint object\nvar multipointJSON = '{\"points\": [[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]],\"spatialReference\" : { \"wkid\": 3857 }}';\nMultipoint(multipointJSON);\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(jsonDefinition) -> Multipoint","insertText":"Multipoint(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"Constructs a Multipoint object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Multipoint objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the multipoint geometry object.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Multipoint objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#MULTIPOINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"nearestcoordinate","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestcoordinate","description":"Returns the nearest coordinate (not vertex) of the input geometry to the search point. The returned dictionary also includes the shortest planar distance from the search point to the nearest coordinate. If the search point intersects the input geometry, then the search point is returned as the result with a distance of zero.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the nearest coordinate from the input polygon along with the distance to that coordinate\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['*'],\n true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestCoordinate(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestCoordinate","detail":"NearestCoordinate(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestCoordinate(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest coordinate (not vertex) of the input geometry to the search point. The returned dictionary also includes the shortest planar distance from the search point to the nearest coordinate. If the search point intersects the input geometry, then the search point is returned as the result with a distance of zero.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry from which to get the nearest coordinate.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point from which to find the nearest coordinate of the `inputGeometry`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The closest coordinate from the `inputGeometry` to the `searchPoint`.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the closest coordinate to the `searchPoint`. This represents the shortest distance between the `inputGeometry` and the `searchPoint`.\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The spatial relationship between the `searchPoint` and the segment of the `inputGeometry` leading up to the nearest coordinate. Possible values: \n\n`left` - The `searchPoint` is on the left side of the `inputGeometry`.\n\n`right` - The `searchPoint` is on the right side of the `inputGeometry`.\n\n`straddle` - The `searchPoint` straddles or is on top of the `inputGeometry`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"nearestvertex","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestvertex","description":"Returns the nearest vertex of the input geometry to the search point. The returned dictionary includes the planar distance from the search point to the nearest vertex.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the nearest vertex from the input polygon along with the distance to that vertex\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['*'],\n true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestVertex(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestVertex","detail":"NearestVertex(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestVertex(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest vertex of the input geometry to the search point. The returned dictionary includes the planar distance from the search point to the nearest vertex.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry from which to get the nearest vertex.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point from which to find the nearest vertex of the `inputGeometry`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point location representing the nearest vertex from the `inputGeometry` to the `searchPoint`.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the input geometry's closest vertex to the `searchPoint`.\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The spatial relationship between the `searchPoint` and the segment of the `inputGeometry` leading up to the nearest vertex. Possible values: \n\n`left` - The `searchPoint` is on the left side of the `inputGeometry`.\n\n`right` - The `searchPoint` is on the right side of the `inputGeometry`.\n\n`straddle` - The `searchPoint` straddles or is on top of the `inputGeometry`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"offset","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#offset","description":"Creates a geometry that is a constant planar distance from an input geometry. It is similar to buffering, but produces a one-sided result.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the offset geometry\n\n```arcade\nOffset($feature, 10, 'meters', 'square');\n```\n\n","completion":{"label":"Offset","detail":"Offset(inputGeometry, offsetDistance, offsetUnit?, joinType?, bevelRatio?, flattenError?) -> Geometry","insertText":"Offset(${1:inputGeometry_}, ${2:offsetDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a geometry that is a constant planar distance from an input geometry. It is similar to buffering, but produces a one-sided result.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to offset. Point geometries are not supported.\n- **offsetDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance to offset from the input geometry. If `offsetDistance > 0`, then the offset geometry is constructed to the right of the input geometry, if `offsetDistance = 0`, then there is no change in the geometries, otherwise it is constructed to the left. The direction of the paths or rings of the input geometry determines which side of the geometry is considered right, and which side is considered left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the right side of a simple polygon is always its inside.\n- **offsetUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for `offsetDistance`. Defaults to the units of the input geometry. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **joinType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The join type. Possible values are `round`, `bevel`, `miter`, or `square`.\n- **bevelRatio** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applicable when `joinType = 'miter'`; `bevelRatio` is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled.\n- **flattenError** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applicable when `joinType = 'round'`; `flattenError` determines the maximum distance of the resulting segments compared to the true circular arc. The algorithm never produces more than around 180 vertices for each round join.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":6}},{"type":"function","name":"overlaps","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#overlaps","description":"Indicates if one geometry overlaps another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries overlap\n\n```arcade\nvar geom2 = Polygon({ ... });\nOverlaps($feature, geom2);\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(geometry1, geometry2) -> Boolean","insertText":"Overlaps(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry overlaps another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'overlaps' relationship with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'overlaps' relationship with `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point1","description":"Constructs a Point object from a dictionary.","examples":"\n**Examples**\n\nCreates a Point with only x, y coordinates\n\n```arcade\nPoint({\n x: -97.06138,\n y: 32.837,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with m values\n\n```arcade\nPoint({\n hasM: true,\n x: -97.06138,\n y: 32.837,\n m: 15,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with z values\n\n```arcade\nPoint({\n hasZ: true,\n x: -97.06138,\n y: 32.837,\n z: 1500,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with z and m values\n\n```arcade\nPoint({\n hasM: true,\n hasZ: true,\n x: -97.06138,\n y: 32.837,\n z: 1500,\n m: 15,\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Point","detail":"Point(geometryDefinition) -> Point","insertText":"Point(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Point object from a dictionary.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Point geometry object.\n\n - **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The x-coordinate (longitude) of the point location.\n - **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The y-coordinate (latitude) of the point location.\n - **m**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The m-value (measure) of the point location. If providing an m-value, then you must set `hasM` to `true`.\n - **z**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The z-value (elevation or height) of the point location. If providing a z-value, then you must set `hasZ` to `true`.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point2","description":"Constructs a Point object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Point objects.","examples":"\n**Example**\n\n```arcade\n// Creates a Point object\nvar pointJSON = '{ \"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }}';\nPoint(pointJSON)\n```\n\n","completion":{"label":"Point","detail":"Point(jsonDefinition) -> Point","insertText":"Point(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Point object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Point objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the point geometry object.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Point objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"pointtocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#pointtocoordinate","description":"Returns the nearest coordinate and distance to that coordinate of the search point to the input line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the distance to the nearest coordinate along the input polyline based on the clicked location to open a popup\n\n```arcade\nvar result;\n\nif (TypeOf($userInput) == \"Point\"){\n result = PointToCoordinate(Geometry($feature), $userInput);\n}\n\nreturn result.distanceAlong;\n```\n\n","completion":{"label":"PointToCoordinate","detail":"PointToCoordinate(inputLine, searchPoint) -> Dictionary","insertText":"PointToCoordinate(${1:inputLine_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest coordinate and distance to that coordinate of the search point to the input line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to get the nearest coordinate. When using a Feature as input, the feature's geometry must be a polyline.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point from which to find the nearest coordinate of the `inputLine`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point coordinate representing the nearest coordinate along the `inputLine` to the `searchPoint`. If `hasZ` is `false` in `searchPoint`, then the search is performed in x/y coordinates and the z-value is interpolated.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the `searchPoint` to the `coordinate`.\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the start of the `inputLine` measured along the line to the `coordinate`. In polylines where paths do not connect, the `distanceAlong` value does not include the distance of the gaps between the starting and ending vertices of the paths.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon1","description":"Constructs a Polygon object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a Polygon with only x, y coordinates\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n rings: [\n [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832],\n [-97.06138,32.837]\n ],\n [\n [-97.06326,32.759],\n [-97.06298,32.755],\n [-97.06326,32.759]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with m values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasM: true,\n rings: [\n [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50],\n [-97.06138,32.837,0]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with z values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasZ: true,\n rings: [\n [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500],\n [-97.06138,32.837,1000]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with z and m values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasM: true,\n hasZ: true,\n rings: [\n [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50],\n [-97.06138,32.837,1000,0]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Polygon geometry object.\n\n - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of rings (or shapes) where each ring is an array of vertices.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a ring. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of rings (or shapes) that may contain curves.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes. Each item in the array can be either a vertex or a curve object.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a ring. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a ring. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon2","description":"Constructs a Polygon object from a dictionary using an array of Points as coordinates.","examples":"\n**Example**\n\nCreates a Polygon with only x, y coordinates\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n rings: [\n [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n ],\n [\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } })\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from a dictionary using an array of Points as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Polygon geometry object.\n\n - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of rings (or shapes) where each ring is an array of point objects.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points representing a ring. All rings should be closed, meaning the first point of each ring should always be the same as the last point in the ring. Points should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes.\n - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of rings (or shapes) that may contain curves.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes. Each item in the array can be either a vertex or a curve object.\n\n - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - An point representing a single vertex or coordinate in a ring.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a ring. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon3","description":"Constructs a Polygon object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polygon objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.","examples":"\n**Example**\n\n```arcade\n// Creates a Polygon object\nvar polygonJSON = '{\"rings\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832], [-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06153,32.749], [-97.06326,32.759]]],\"spatialReference\": { \"wkid\": 3857 }}';\nPolygon(polygonJSON);\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(jsonDefinition) -> Polygon","insertText":"Polygon(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polygon objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the polygon geometry object.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Polygon objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYGON)\n"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline1","description":"Constructs a Polyline object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a polyline with only x, y coordinates\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n paths: [\n [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832]\n ],\n [\n [-97.06326,32.759],\n [-97.06298,32.755]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with m values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasM: true,\n paths: [\n [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with z values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasZ: true,\n paths: [\n [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with z and m values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasM: true,\n hasZ: true,\n paths: [\n [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the polyline geometry object.\n\n - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of paths (or line segments) where each path is an array of vertices.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices in a line segment, or path.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a line segment. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of paths (or line segments) that may contain curves.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a path.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a line segment. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a path. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline2","description":"Constructs a Polyline object from a dictionary using an array of Points as coordinates.","examples":"\n**Example**\n\nCreates a polyline with only x, y coordinates\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n paths: [\n [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } })\n ],\n [\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } })\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from a dictionary using an array of Points as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the polyline geometry object.\n\n - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of paths (or line segments) where each path is an array of point objects.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points representing a line segment, or path.\n - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of paths (or line segments) that may contain curves.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a path.\n\n - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - A point representing a vertex in a path.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a path. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline3","description":"Constructs a Polyline object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polyline objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.","examples":"\n**Example**\n\n```arcade\n// Creates a Polyline object\nvar polylineJSON = '{\"paths\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]], [[-97.06326,32.759],[-97.06298,32.755]]], \"spatialReference\": { \"wkid\": 3857 } }'\nPolyline(polylineJSON);\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(jsonDefinition) -> Polyline","insertText":"Polyline(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polyline objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text from which to construct the polyline geometry object.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Polyline objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYLINE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"relate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#relate","description":"Indicates if the given DE-9IM relation is `true` for the two geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the relation of the input geometries matches\n\n```arcade\nRelate($feature, geometry2, 'TTTFFTFFT')\n```\n\n","completion":{"label":"Relate","detail":"Relate(geometry1, geometry2, relation) -> Boolean","insertText":"Relate(${1:geometry1_}, ${2:geometry2_}, ${3:relation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the given DE-9IM relation is `true` for the two geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first geometry for the relation.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second geometry for the relation.\n- **relation**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix relation (encoded as a text value) to test against the relationship of the two geometries. This text contains the test result of each intersection represented in the DE-9IM matrix. Each result is one character of the text and may be represented as either a number (maximum dimension returned: 0,1,2), a Boolean value (T or F), or a mask character (for ignoring results: '\\*').\n\nExample: Each of the following DE-9IM text codes are valid for testing whether a polygon geometry completely contains a line geometry: TTTFFTFFT (Boolean), 'T\\*\\*\\*\\*\\*\\*FF\\*' (ignore irrelevant intersections), or '102FF\\*FF\\*' (dimension form). Each returns the same result.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"ringisclockwise","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#ringisclockwise","description":"Indicates whether the points in a polygon ring are ordered in a clockwise direction.","examples":"\n**Example**\n\n```arcade\n// $feature is a polygon feature\nvar polygonRings = Geometry($feature).rings;\nIIf(RingIsClockwise(polygonRings[0]), 'correct polygon', 'incorrect direction')\n```\n\n","completion":{"label":"RingIsClockwise","detail":"RingIsClockwise(points) -> Boolean","insertText":"RingIsClockwise(${1:points_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the points in a polygon ring are ordered in a clockwise direction.\n\n**Parameter**\n\n- **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points in a polygon ring.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"rotate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#rotate","description":"Rotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the input feature rotated about the centroid by 90 degrees\n\n```arcade\nRotate($feature, 90)\n```\n\n","completion":{"label":"Rotate","detail":"Rotate(inputGeometry, angle, rotationOrigin?) -> Geometry","insertText":"Rotate(${1:inputGeometry_}, ${2:angle_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to rotate.\n- **angle**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The rotation angle in degrees.\n- **rotationOrigin** (_Optional_): [Point](https://developers.arcgis.com/arcade/guide/types/#point) - Point to rotate the geometry around. Defaults to the centroid of the geometry.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"setgeometry","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#setgeometry","description":"Sets or replaces a geometry on a user-defined Feature. Note that features referenced as global variables are immutable; their geometries cannot be changed.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nSets a new geometry on the feature\n\n```arcade\nvar pointFeature = Feature(Point( ... ), 'name', 'buffer centroid');\nvar mileBuffer = BufferGeodetic(Geometry(pointFeature), 1, 'mile');\nSetGeometry(pointFeature, mileBuffer);\n```\n\n","completion":{"label":"SetGeometry","detail":"SetGeometry(inputFeature, inputGeometry) -> Null","insertText":"SetGeometry(${1:inputFeature_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSets or replaces a geometry on a user-defined Feature. Note that features referenced as global variables are immutable; their geometries cannot be changed.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A feature whose geometry will be updated.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to set on the input feature.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"simplify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#simplify","description":"Performs the simplify operation on the geometry. This alters the given geometry to make it topologically legal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the simplified geometry of the feature\n\n```arcade\nSimplify($feature);\n```\n\n","completion":{"label":"Simplify","detail":"Simplify(inputGeometry) -> Geometry","insertText":"Simplify(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the simplify operation on the geometry. This alters the given geometry to make it topologically legal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to be simplified.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"symmetricdifference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#symmetricdifference","description":"Performs the Symmetric difference operation on the two geometries. The symmetric difference includes the parts of both geometries that are not common with each other.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a polygon representing areas where both inputs do not overlap\n\n```arcade\nvar geom2 = Polygon({ ... });\nSymmetricDifference($feature, geom2);\n```\n\n","completion":{"label":"SymmetricDifference","detail":"SymmetricDifference(leftGeometry, rightGeometry) -> Geometry","insertText":"SymmetricDifference(${1:leftGeometry_}, ${2:rightGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the Symmetric difference operation on the two geometries. The symmetric difference includes the parts of both geometries that are not common with each other.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **leftGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry instance to compare to `rightGeometry` in the XOR operation.\n- **rightGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry instance to compare to `leftGeometry` in the XOR operation.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#touches","description":"Indicates if one geometry touches another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries touch\n\n```arcade\nvar geom2 = Polygon({ ... });\nTouches($feature, geom2);\n```\n\n","completion":{"label":"Touches","detail":"Touches(geometry1, geometry2) -> Boolean","insertText":"Touches(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry touches another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union1","description":"Constructs the set-theoretic union of the geometries or features in an input array and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\n```arcade\nvar geom2 = Polygon({ ... });\nUnion([ $feature, geom2 ]);\n```\n\n","completion":{"label":"Union","detail":"Union(geometries) -> Geometry","insertText":"Union(${1:geometries_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic union of the geometries or features in an input array and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameter**\n\n- **geometries**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)> - An array of geometries or an array of features to union into a single geometry. This can be any number of geometries.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union2","description":"Constructs the set-theoretic union of a list of geometries and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\n```arcade\nvar geom2 = Polygon({ ... });\nvar geom3 = Polygon({ ... });\nvar geom4 = Polygon({ ... });\nUnion(Geometry($feature), geom2, geom3, geom4);\n```\n\n","completion":{"label":"Union","detail":"Union(geometry1, [geometry2, ..., geometryN]?) -> Geometry","insertText":"Union(${1:geometry1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic union of a list of geometries and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A geometry to union into a single geometry with the other geometries.\n- **[geometry2, ..., geometryN]** (_Optional_): [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - An ongoing list of geometries or features to union into a single geometry. This can be any number of geometries.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":-1}}],{"type":"function","name":"within","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#within","description":"Indicates if one geometry is within another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the feature is within the given polygon\n\n```arcade\nvar outerGeom = Polygon({ ... });\nWithin($feature, outerGeom);\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerGeometry) -> Boolean","insertText":"Within(${1:innerGeometry_}, ${2:outerGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry is within another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'within' relationship to `outerGeometry`.\n- **outerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'contains' relationship to `innerGeometry`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"knowledge-graph_functions","title":"Knowledge graph functions","items":[{"type":"function","name":"knowledgegraphbyportalitem","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#knowledgegraphbyportalitem","description":"Returns a knowledge graph from a portal item.","examples":"\n**Example**\n\nReturns the knowledge graph from the portal item.\n\n```arcade\nvar knowledgeGraph = KnowledgeGraphByPortalItem(\n Portal('https://www.example.com/arcgis'), // enterprise portal\n '7b1fb95ab77f40bf8aa09c8b59045449',\n);\n```\n\n","completion":{"label":"KnowledgeGraphByPortalItem","detail":"KnowledgeGraphByPortalItem(portalObject, itemId) -> KnowledgeGraph","insertText":"KnowledgeGraphByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a knowledge graph from a portal item.\n\n**Parameters**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - The Portal from which to query features.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The GUID of the portal item referencing a knowledge graph service. _This value must be a text literal._\n\n**Return value**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph)\n\n**Additional resources**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"querygraph","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#querygraph","description":"Queries a knowledge graph with an openCypher query and returns the set of entities and relationships in a graph, along with their properties.","examples":"\n**Examples**\n\nQueries the knowledge graph for information about the `Student` entities it contains.\n\n```arcade\nvar results = QueryGraph(\n knowledgeGraph,\n 'MATCH (p:Student)-[e:EnrolledAt]->(s:School)\n WHERE s.name = \"Eastside Elementary\"\n RETURN p,e,s.principal,s.numStaff\n LIMIT 1');\n\nreturn Text(results);\n```\n\nQueries the knowledge graph using bind parameters.\n\n```arcade\n// searches for entities with a `name` property that matches the given string in the query parameters\n// OR falls within the given geom bounding box\n// query returns both the supplier and the part that it buys\nvar query = `MATCH (s:Supplier)-[:buys_part]-(p:Part)\n WHERE s.name=$name OR esri.graph.ST_Intersects($geom, s.geometry)\n RETURN s,p`;\n \n var results = QueryGraph(\n $graph,\n query,\n {\n \"name\": \"Supplier 1\",\n \"geom\": Polygon({\n rings: [[\n [38,-78],\n [39,-79],\n [39,-76],\n [-38,-76],\n [-38,-78]\n ]]\n })\n }\n );\n```\n\n","completion":{"label":"QueryGraph","detail":"QueryGraph(graph, openCypherQuery, queryParameters?, includeProvenance?) -> Array","insertText":"QueryGraph(${1:graph_}, ${2:openCypherQuery_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nQueries a knowledge graph with an openCypher query and returns the set of entities and relationships in a graph, along with their properties.\n\n**Parameters**\n\n- **graph**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph) - The knowledge graph to query.\n- **openCypherQuery**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The openCypher query to be executed against the knowledge graph.\n- **queryParameters** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary of named query parameters for the openCypher query. The parameter names or keys in the dictionary are case-sensitive. Parameters accepted depend on the external graph store and can be of type: `Array`, `Date`, `Dictionary`, `Geometry`, `Number`, `Text`\n- **includeProvenance** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - _Since 1.31_ Indicates whether to include provenance entities (metadata) in the query results. Default is `false`.\n\n**Return value**: Array\n\n**Additional resources**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":4}}]},{"id":"logical_functions","title":"Logical functions","items":[{"type":"function","name":"boolean","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#boolean","description":"Attempts to convert the given non-boolean value to a boolean value. For example a text value of 'true' would become `true`.","examples":"\n**Examples**\n\n```arcade\n// returns `true`\nBoolean('true')\n```\n\n```arcade\n// returns `false`. A value of 1 would return `true`\nBoolean(0)\n```\n\n```arcade\n// returns `false`\nBoolean('hello')\n```\n\n","completion":{"label":"Boolean","detail":"Boolean(value) -> Boolean","insertText":"Boolean(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAttempts to convert the given non-boolean value to a boolean value. For example a text value of 'true' would become `true`.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A text or number value to be converted to a boolean.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"decode","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#decode","description":"Evaluates an expression to a value and compares the result value with the value of subsequent parameters. If the expression evaluates to a matching value, it returns the subsequent parameter value. If no matches are found, then the `default` value will be returned. This is similar to a switch/case statement.","examples":"\n**Example**\n\n```arcade\n// returns a meaningful value when a field contains coded values\nvar code = $feature.codedValue;\nvar decodedValue = Decode(code, 1, 'Residential', 2, 'Commercial', 3, 'Mixed', 'Other');\n```\n\n","completion":{"label":"Decode","detail":"Decode(expression, [compare1, return1, ..., compareN, returnN], default) -> Any","insertText":"Decode(${1:expression_}, ${2:[compare1, return1, ..., compareN, returnN]_}, ${3:default_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEvaluates an expression to a value and compares the result value with the value of subsequent parameters. If the expression evaluates to a matching value, it returns the subsequent parameter value. If no matches are found, then the `default` value will be returned. This is similar to a switch/case statement.\n\n**Parameters**\n\n- **expression**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An Arcade expression that must evaluate to a value that can be compared with the provided case values.\n- **[compare1, return1, ..., compareN, returnN]**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A set of compare values and return value pairs.\n- **default**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A default value to return if none of the compare values match. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the matched return value. If no matches are found, then the `default` value is returned."}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#defaultvalue","description":"Returns a specified default value if an empty value is detected.","examples":"\n**Example**\n\n```arcade\n// If a feature has no value in the POP_2000 field\n// then 'no data' is returned\nDefaultValue($feature.POP_2000, 'no data')\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(value, defaultValue) -> Any","insertText":"DefaultValue(${1:value_}, ${2:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if an empty value is detected.\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The input value to compare against `null` or `''`. This may be a value of any type. However, if this value is an empty array, then the empty array will be returned.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Return this value if the provided `value` is empty. The data type of `defaultValue` must match the data type of `value`.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nIf `value` is empty, then the `defaultValue` is returned. Otherwise, the value of `value` is returned."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#equals","description":"Indicates if two values are equal. Object types (i.e. Arrays, Features, Dictionaries, Geometry) will return true only if they are the same object.","examples":"\n**Example**\n\nCompares if two values are equal\n\n```arcade\nEquals(1, \"1\") // returns false\n\nvar testVal = \"test\";\nEquals(testVal, \"test\") // returns true\n\nvar array1 = Array(5);\nvar array2 = Array(5);\nEquals(array1, array2); // returns false\nEquals(array1, array1); // returns true\n```\n\n","completion":{"label":"Equals","detail":"Equals(value1, value2) -> Boolean","insertText":"Equals(${1:value1_}, ${2:value2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if two values are equal. Object types (i.e. Arrays, Features, Dictionaries, Geometry) will return true only if they are the same object.\n\n**Parameters**\n\n- **value1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first input value.\n- **value2**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The second input value.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"iif","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#iif","description":"Returns a given value if a conditional expression evaluates to `true`, and returns an alternate value if that condition evaluates to `false`.","examples":"\n**Example**\n\n```arcade\n// returns 'below' if the value is less than 1,000,000.\n// if the value is more than 1,000,000, then returns 'above'\nvar population = $feature.POP_2007;\nIIf(population < 1000000, 'below', 'above');\n```\n\n","completion":{"label":"IIf","detail":"IIf(condition, trueValue, falseValue) -> Any","insertText":"IIf(${1:condition_}, ${2:trueValue_}, ${3:falseValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a given value if a conditional expression evaluates to `true`, and returns an alternate value if that condition evaluates to `false`.\n\n**Parameters**\n\n- **condition**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - A logical expression that must evaluate to `true` or `false`.\n- **trueValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to return if the `condition` evaluates to `true`. This may be a value of any type.\n- **falseValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to return if the `condition` evaluates to `false`. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nIf `condition` is `true`, then the `trueValue` is returned. Otherwise, the value of `falseValue` is returned."}},"parametersInfo":{"min":3,"max":3}},[{"type":"function","name":"isempty","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty1","description":"Returns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` - `\"\"` (empty text value) \nReturns `false` for all other cases, including empty arrays and dictionaries.","examples":"\n**Examples**\n\n```arcade\n// Returns true\nIsEmpty(null)\n```\n\n```arcade\n// Returns false\nIsEmpty('hello world')\n```\n\n```arcade\n// Returns false\nIsEmpty([])\n```\n\n","completion":{"label":"IsEmpty","detail":"IsEmpty(value) -> Boolean","insertText":"IsEmpty(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` - `\"\"` (empty text value) \nReturns `false` for all other cases, including empty arrays and dictionaries.\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check for emptiness (i.e. `null`, `''`).\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isempty","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty2","description":"Returns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` \n - `\"\"` (empty text value) \n\n\nThe following scenarios return `true` only if `checkContainers` is `true`: \n - array with no items \n - dictionary with no keys \n - Feature with no geometry or attributes \n - FeatureSet with no features \n - any other data type without keys (e.g. Voxel, etc)","examples":"\n**Examples**\n\n```arcade\n// Returns true since the array is empty\nIsEmpty([], true)\n```\n\n```arcade\n// Returns false since the array has items\nIsEmpty([1,null,3], true)\n```\n\n```arcade\n// Returns true if the layer has no features\nIsEmpty($layer, true)\n```\n\n```arcade\n// Returns true since the FeatureSet has no features\nvar fs = FeatureSet('{\"fields\":[{\"alias\":\"ELEV_m\",\"name\":\"ELEV_m\",\"type\":\"esriFieldTypeInteger\"}],\"spatialReference\":{\"wkid\":4326},\"geometryType\":\"esriGeometryPoint\",\"features\":[]}')\nIsEmpty(fs, true)\n```\n\n```arcade\n// Returns true since the dictionary is empty\nvar dict = {}\nIsEmpty(dict, true)\n```\n\n```arcade\n// Returns false since the dictionary has a key\nvar dict = {a: \"\"}\nIsEmpty(dict, true)\n```\n\n","completion":{"label":"IsEmpty","detail":"IsEmpty(value, checkContainers) -> Boolean","insertText":"IsEmpty(${1:value_}, ${2:checkContainers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` \n - `\"\"` (empty text value) \n\n\nThe following scenarios return `true` only if `checkContainers` is `true`: \n - array with no items \n - dictionary with no keys \n - Feature with no geometry or attributes \n - FeatureSet with no features \n - any other data type without keys (e.g. Voxel, etc)\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check for emptiness (i.e. `null`, `''`, or containers with no items).\n- **checkContainers**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Set to `true` to check input data types that may contain other values, such as whether an array or feature set has items, a dictionary or feature has keys, etc.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"isnan","bundle":"core","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isnan","description":"Indicates whether the input value is not a number (NaN). A number is considered NaN in one of the following scenarios: - `0/0` - `Infinity / Infinity` - `Infinity * 0` - Any operation in which NaN is an operand - Casting a non-numeric text or `undefined` to a number","examples":"\n**Examples**\n\n```arcade\n// Returns true\nIsNan(Infinity / Infinity)\n```\n\n```arcade\n// Returns false\nIsNan('4')\n```\n\n","completion":{"label":"IsNan","detail":"IsNan(value) -> Boolean","insertText":"IsNan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the input value is not a number (NaN). A number is considered NaN in one of the following scenarios: - `0/0` - `Infinity / Infinity` - `Infinity * 0` - Any operation in which NaN is an operand - Casting a non-numeric text or `undefined` to a number\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check if it is NaN.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"typeof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#typeof","description":"Returns the type of the input value. Will return one of the following types: `Array`, `Date`, `String`, `Boolean`, `Number`, `Dictionary`, `Feature`, `FeatureSet`, `Point`, `Polygon`, `Polyline`, `Multipoint`, `Extent`, `Function`, `Pixel`, `Voxel`, `Unrecognized Type`.","examples":"\n**Examples**\n\nprints 'Boolean'\n\n```arcade\nTypeOf(true)\n```\n\nprints 'Date'\n\n```arcade\nTypeOf(Now())\n```\n\n","completion":{"label":"TypeOf","detail":"TypeOf(value) -> Text","insertText":"TypeOf(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the type of the input value. Will return one of the following types: `Array`, `Date`, `String`, `Boolean`, `Number`, `Dictionary`, `Feature`, `FeatureSet`, `Point`, `Polygon`, `Polyline`, `Multipoint`, `Extent`, `Function`, `Pixel`, `Voxel`, `Unrecognized Type`.\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The input value, variable, or feature attribute.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"when","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#when","description":"Evaluates a series of conditional expressions until one evaluates to `true`.","examples":"\n**Example**\n\nReclassify a numeric field value to a generic ranking (text). \nIf all expressions are `false`, then 'n/a' is returned\n\n```arcade\nvar density = $feature.densityField;\nvar ranking = When(density < 50, 'low', density >=50 && density < 100, 'medium', density >= 100, 'high', 'n/a');\n```\n\n","completion":{"label":"When","detail":"When(expression1, result1, [expression2, result2, ..., expressionN, resultN]?, defaultValue) -> Any","insertText":"When(${1:expression1_}, ${2:result1_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEvaluates a series of conditional expressions until one evaluates to `true`.\n\n**Parameters**\n\n- **expression1**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - a conditional expressions, if it evaluates to `true` then `result1` will be returned.\n- **result1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The result returned if the `expression1` evaluates to `true`. This may be a value of any type.\n- **[expression2, result2, ..., expressionN, resultN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A series of conditional expressions and return values if the given expression evaluates to `true`. This may be a value of any type.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Returns this value if all expressions evaluate to `false`. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":3,"max":-1}}]},{"id":"math_functions","title":"Math functions","items":[{"type":"function","name":"abs","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#abs","description":"Returns the absolute value of a number. If the input is `null`, then it returns 0.","examples":"\n**Example**\n\nprints 3\n\n```arcade\nAbs(-3)\n```\n\n","completion":{"label":"Abs","detail":"Abs(value) -> Number","insertText":"Abs(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the absolute value of a number. If the input is `null`, then it returns 0.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"acos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#acos","description":"Returns the arccosine of the input value in radians, in the range of zero to PI. If the input value is outside the appropriate range of +/- 1, then NaN is returned.","examples":"\n**Example**\n\nprints 1.266104\n\n```arcade\nAcos(0.3)\n```\n\n","completion":{"label":"Acos","detail":"Acos(value) -> Number","insertText":"Acos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arccosine of the input value in radians, in the range of zero to PI. If the input value is outside the appropriate range of +/- 1, then NaN is returned.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number between -1 and 1 on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"asin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#asin","description":"Returns the arcsine of the input value in radians, in the range of -PI/2 and PI/2. If the input value is outside the appropriate range of +/- 1, then NaN is returned.","examples":"\n**Example**\n\nprints 0.304693\n\n```arcade\nAsin(0.3)\n```\n\n","completion":{"label":"Asin","detail":"Asin(value) -> Number","insertText":"Asin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arcsine of the input value in radians, in the range of -PI/2 and PI/2. If the input value is outside the appropriate range of +/- 1, then NaN is returned.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number between -1 and 1 on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan","description":"Returns the arctangent of the input value in radians, in the range of -PI/2 and PI/2.","examples":"\n**Example**\n\nprints 0.785398\n\n```arcade\nAtan(1)\n```\n\n","completion":{"label":"Atan","detail":"Atan(value) -> Number","insertText":"Atan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arctangent of the input value in radians, in the range of -PI/2 and PI/2.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan2","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan2","description":"Returns the arctangent of the quotient of the input values in radians, in the range of -PI and zero or zero and PI depending on the sign of arguments.","examples":"\n**Example**\n\nprints -2.356194\n\n```arcade\nAtan2(-1, -1)\n```\n\n","completion":{"label":"Atan2","detail":"Atan2(y, x) -> Number","insertText":"Atan2(${1:y_}, ${2:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arctangent of the quotient of the input values in radians, in the range of -PI and zero or zero and PI depending on the sign of arguments.\n\n**Parameters**\n\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the y-coordinate.\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the x-coordinate.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average1","description":"Returns the average of an array of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nvar values = [0,5,10]\nAverage(values)\n```\n\n","completion":{"label":"Average","detail":"Average(numbers) -> Number","insertText":"Average(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average2","description":"Returns the average of a list of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nAverage(0,5,10)\n```\n\n","completion":{"label":"Average","detail":"Average([number1, ..., numberN]?) -> Number","insertText":"Average($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"ceil","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#ceil","description":"Returns the input value rounded upwards to the given number of decimal places.","examples":"\n**Example**\n\nprints 2135.1\n\n```arcade\nCeil(2135.0905, 2)\n```\n\n","completion":{"label":"Ceil","detail":"Ceil(value, numPlaces?) -> Number","insertText":"Ceil(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value rounded upwards to the given number of decimal places.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number to round upward.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the `value` to. Default is 0. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"constrain","bundle":"core","sinceVersion":"1.2","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#constrain","description":"Constrains the given input `value` to minimum and maximum bounds. For example, if the input value is `10`, the lower bound is `50`, and the upper bound is `100`, then `50` is returned.","examples":"\n**Examples**\n\nreturns 5\n\n```arcade\nConstrain(5, 0, 10)\n```\n\nreturns 0\n\n```arcade\nConstrain(-3, 0, 10)\n```\n\nreturns 10\n\n```arcade\nConstrain(553, 0, 10)\n```\n\n","completion":{"label":"Constrain","detail":"Constrain(value, lowerBound, upperBound) -> Number","insertText":"Constrain(${1:value_}, ${2:lowerBound_}, ${3:upperBound_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.2](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstrains the given input `value` to minimum and maximum bounds. For example, if the input value is `10`, the lower bound is `50`, and the upper bound is `100`, then `50` is returned.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to constrain to the given `min` and `max` bounds.\n- **lowerBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound by which to constrain the input `value`. If the given value is less than the `min`, then `min` is returned.\n- **upperBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound by which to constrain the input `value`. If the given value is greater than the `max`, then `max` is returned.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"cos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#cos","description":"Returns the cosine of the input value in radians.","examples":"\n**Example**\n\nprints 0.540302\n\n```arcade\nCos(1)\n```\n\n","completion":{"label":"Cos","detail":"Cos(value) -> Number","insertText":"Cos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the cosine of the input value in radians.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number in radians on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"exp","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#exp","description":"Returns the value of e to the power of x, where e is the base of the natural logarithm `2.718281828`.","examples":"\n**Example**\n\nprints 7.389056\n\n```arcade\nExp(2)\n```\n\n","completion":{"label":"Exp","detail":"Exp(x) -> Number","insertText":"Exp(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the value of e to the power of x, where e is the base of the natural logarithm `2.718281828`.\n\n**Parameter**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The power, or number of times to multiply `e` to itself.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"floor","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#floor","description":"Returns the input value rounded downward to the given number of decimal places.","examples":"\n**Example**\n\nprints 2316.25\n\n```arcade\nFloor(2316.2562, 2)\n```\n\n","completion":{"label":"Floor","detail":"Floor(value, numPlaces?) -> Number","insertText":"Floor(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value rounded downward to the given number of decimal places.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number to round downward.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the number. Default is 0. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"hash","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#hash","description":"Generates a hash code value for the given variable.","examples":"\n**Example**\n\nReturns `1649420691`.\n\n```arcade\nHash('text value')\n```\n\n","completion":{"label":"Hash","detail":"Hash(value) -> Number","insertText":"Hash(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGenerates a hash code value for the given variable.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The variable to be hashed. DateOnly and Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"log","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#log","description":"Returns the natural logarithm (base e) of x.","examples":"\n**Example**\n\nprints 2.302585\n\n```arcade\nLog(10)\n```\n\n","completion":{"label":"Log","detail":"Log(x) -> Number","insertText":"Log(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the natural logarithm (base e) of x.\n\n**Parameter**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max1","description":"Returns the largest value from an array of numbers.","examples":"\n**Example**\n\nprints 89\n\n```arcade\nMax([23,56,89])\n```\n\n","completion":{"label":"Max","detail":"Max(numbers) -> Number","insertText":"Max(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the largest value from an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max2","description":"Returns the largest value from a list of numbers.","examples":"\n**Example**\n\nprints 120\n\n```arcade\nMax(23,5,120,43,9)\n```\n\n","completion":{"label":"Max","detail":"Max([number1, ..., numberN]?) -> Number","insertText":"Max($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the largest value from a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean1","description":"Returns the mean value of an array of numbers.","examples":"\n**Example**\n\n```arcade\nvar values = [1,2,3,4,5,6,7,8,9];\nMean(values);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean(numbers) -> Number","insertText":"Mean(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers from which to calculate the mean.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean2","description":"Returns the mean value of a list of numbers.","examples":"\n**Example**\n\n```arcade\nMean(1,2,3,4,5,6,7,8,9);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean([number1, ..., numberN]?) -> Number","insertText":"Mean($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers from which to calculate the mean.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min1","description":"Returns the lowest value in a given array of numbers.","examples":"\n**Example**\n\nprints 23\n\n```arcade\nMin([23,56,89])\n```\n\n","completion":{"label":"Min","detail":"Min(numbers) -> Number","insertText":"Min(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value in a given array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min2","description":"Returns the lowest value in a given list of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nMin(23,5,120,43,9)\n```\n\n","completion":{"label":"Min","detail":"Min([number1, ..., numberN]?) -> Number","insertText":"Min($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value in a given list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"number","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#number","description":"Converts the input value to a number. Date values will be converted to the number of milliseconds since Jan. 1, 1970 (i.e. the Unix epoch).","examples":"\n**Examples**\n\nParses a number using a grouping separator appropriate for the local in which the expression is executed\n\n```arcade\nNumber('1,365', ',###') // returns 1365\n```\n\nRemove text characters from number.\n\n```arcade\nNumber('abc10def', 'abc##def') // return 10\n```\n\nSpecify minimum digits past 0 as two and maximum digits past 0 as 4.\n\n```arcade\nNumber('10.456','00.00##') // returns 10.456\n```\n\nSpecify minimum digits past 0 as two and maximum digits past 0 as 4. The left and right side of the function must match or NaN is returned.\n\n```arcade\nNumber('10.4','00.00##') // returns NaN\n```\n\nIndicate the size of the repeated group and the final group size of the input value.\n\n```arcade\nNumber('12,12,456', ',##,###') // returns 1212456\n```\n\nIf there is a negative subpattern, it serves only to specify the negative prefix and suffix.\n\n```arcade\nNumber('-12,23,345', ',##,###;-,##,###') // returns -1223345\n```\n\nDivide by 100. Maximum of three decimal places can be input.\n\n```arcade\nNumber('99.99%', '#.##%') // 0.9999\n```\n\nReturns the number of milliseconds since Jan. 1, 1970.\n\n```arcade\nNumber(Date(1996,11,10)) // returns 850204800000\n```\n\n","completion":{"label":"Number","detail":"Number(value, pattern?) -> Number","insertText":"Number(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts the input value to a number. Date values will be converted to the number of milliseconds since Jan. 1, 1970 (i.e. the Unix epoch).\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to convert to a number.\n- **pattern** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The format pattern text used to parse numbers formatted in a localized context from a text value to a number. The following are special characters used to define the pattern:\n\n - 0: Mandatory digits \n - #: Optional digits \n - %: Divide by 100 \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"pow","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#pow","description":"Returns the value of x to the power of y.","examples":"\n**Example**\n\nprints 9\n\n```arcade\nPow(3, 2)\n```\n\n","completion":{"label":"Pow","detail":"Pow(x, y) -> Number","insertText":"Pow(${1:x_}, ${2:y_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the value of x to the power of y.\n\n**Parameters**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The base value.\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The exponent. This indicates the number of times to multiply `x` by itself.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"random","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#random","description":"Returns a random number between 0 and 1.","examples":"\n**Example**\n\n```arcade\nRandom()\n```\n\n","completion":{"label":"Random","detail":"Random() -> Number","insertText":"Random($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a random number between 0 and 1.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"round","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#round","description":"Returns the input value, rounded to the given number of decimal places. \n_Note: If you're looking to format a value for display in a label or popup, use the `Text()` function._","examples":"\n**Example**\n\nprints 2316.26\n\n```arcade\nRound(2316.2562, 2)\n```\n\n","completion":{"label":"Round","detail":"Round(value, numPlaces?) -> Number","insertText":"Round(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value, rounded to the given number of decimal places. \n_Note: If you're looking to format a value for display in a label or popup, use the `Text()` function._\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number to round.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the number to. Default is `0`. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Text()](https://developers.arcgis.com/arcade/function-reference/text_functions/#text)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"sin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sin","description":"Returns the sine of the input value.","examples":"\n**Example**\n\nprints 0.841741\n\n```arcade\nSin(1)\n```\n\n","completion":{"label":"Sin","detail":"Sin(value) -> Number","insertText":"Sin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sine of the input value.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number in radians on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sqrt","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sqrt","description":"Returns the square root of a number.","examples":"\n**Example**\n\nprints 3\n\n```arcade\nSqrt(9)\n```\n\n","completion":{"label":"Sqrt","detail":"Sqrt(value) -> Number","insertText":"Sqrt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the square root of a number.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to calculate the square root.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev1","description":"Returns the population standard deviation from an array of numbers.","examples":"\n**Example**\n\nprints 27.5\n\n```arcade\nStdev([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(numbers) -> Number","insertText":"Stdev(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the population standard deviation from an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev2","description":"Returns the population standard deviation from a list of numbers.","examples":"\n**Example**\n\nprints 27.5\n\n```arcade\nStdev(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Stdev","detail":"Stdev([number1, ..., numberN]?) -> Number","insertText":"Stdev($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the population standard deviation from a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum1","description":"Returns the sum of an array of numbers.","examples":"\n**Example**\n\nprints 303\n\n```arcade\nSum([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Sum","detail":"Sum(numbers) -> Number","insertText":"Sum(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum2","description":"Returns the sum of a list of numbers.","examples":"\n**Example**\n\nprints 303\n\n```arcade\nSum(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Sum","detail":"Sum([number1, ..., numberN]?) -> Number","insertText":"Sum($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"tan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#tan","description":"Returns the tangent of an angle in radians.","examples":"\n**Example**\n\nprints 0.57389\n\n```arcade\nTan(0.521)\n```\n\n","completion":{"label":"Tan","detail":"Tan(value) -> Number","insertText":"Tan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the tangent of an angle in radians.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to calculate the tangent.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance1","description":"Returns the variance (population variance) of an array of numbers.","examples":"\n**Example**\n\nprints 756.25\n\n```arcade\nVariance([12,23,45,56,78,89])\n```\n\n","completion":{"label":"Variance","detail":"Variance(numbers) -> Number","insertText":"Variance(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance (population variance) of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance2","description":"Returns the variance (population variance) of a list of numbers.","examples":"\n**Example**\n\nprints 756.25\n\n```arcade\nVariance(12,23,45,56,78,89)\n```\n\n","completion":{"label":"Variance","detail":"Variance([number1, ..., numberN]?) -> Number","insertText":"Variance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance (population variance) of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}]]},{"id":"pixel_functions","title":"Pixel functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#defaultvalue","description":"Returns a specified default value if a field name in a given pixel does not exist or the value of the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"No data\" if pixel attribute does not exist or is empty\n\n```arcade\nDefaultValue($pixel, \"Raster.sea_temp\", \"No data\")\n// Returns the sea_temp value if available\n// or 'No data' if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputPixel, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputPixel_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a given pixel does not exist or the value of the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The input pixel to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check for a value.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value of the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#haskey","description":"Indicates whether a pixel contains the given key or attribute.","examples":"\n**Example**\n\nReturns `true` if the pixel has an attribute named `elev`\n\n```arcade\nHasKey($pixel, 'elev');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputPixel, key) -> Boolean","insertText":"HasKey(${1:inputPixel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a pixel contains the given key or attribute.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to check for an attribute name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The attribute name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#hasvalue","description":"Indicates whether a pixel has a given attribute and if that attribute has a value.","examples":"\n**Example**\n\nReturn false if pixel attribute does not exist or is empty\n\n```arcade\niif(HasValue($pixel, \"Raster.ServicePixelValue\"), ($pixel[\"Raster.ServicePixelValue\"][0] - 32) * 5/9, \"No Data\")\n// Returns the temp in celsius if the Raster.ServicePixelValue is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputPixel, key) -> Boolean","insertText":"HasValue(${1:inputPixel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a pixel has a given attribute and if that attribute has a value.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The attribute name to check for a value.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"portal_functions","title":"Portal functions","items":[{"type":"function","name":"featuresetbyportalitem","bundle":"portal-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem","description":"Creates a FeatureSet from a Feature Layer in a portal item from a given Portal. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer from a different portal than the feature in the map.\n\n```arcade\nvar features = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['Name', 'Count'],\n false\n);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByPortalItem","detail":"FeatureSetByPortalItem(portalObject, itemId, layerId?, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer in a portal item from a given Portal. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - The Portal from which to query features from a given portal item ID.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The GUID of the portal item referencing a feature layer or feature service. _Please note that this value must be a text literal._\n- **layerId** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The ID of the layer in the feature service. This layer must be created from a feature service; feature collections are not supported.\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":5}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser1","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns username for the currently logged in user of the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nvar userInfo = GetUser();\nif(HasValue(userInfo, \"username\")){\n return userInfo.username;\n}\n```\n\nReturns the dictionary for the user currently logged in based on the workspace connection from the given portal.\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'))\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, username?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - A Portal from which to return the current user. If no portal is specified, then user information from the active portal is returned.\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the user you want to return. Only limited information will be returned based on your permissions when making the request.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user."}},"parametersInfo":{"min":0,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser2","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns user information for the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nGetUser()\n```\n\nReturns information about the user currently logged in based on the portal with user extensions.\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'), true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, extensions?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - A Portal from which to return the current user. If no portal is specified, then user information from the active portal is returned.\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Determines if the `userLicenseTypeExtensions` will be returned in the dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the license type extensions associated with the user's account (e.g. \"Utility Network\", \"Parcel Fabric\", etc). The `extensions` parameter must be set to `true` in order for this to be returned."}},"parametersInfo":{"min":0,"max":2}}],[{"type":"function","name":"portal","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#portal1","description":"Creates a reference to an ArcGIS Portal.","examples":"\n**Examples**\n\nQuery features from a portal item in ArcGIS Online\n\n```arcade\nvar arcgisPortal = Portal('https://www.arcgis.com');\nvar features = FeatureSetByPortalItem(arcgisPortal, '7b1fb95ab77f40bf8aa09c8b59045449', 0, ['Name', 'Count'], false);\n```\n\nEnterprise Portal\n\n```arcade\nPortal('https://www.example.com/arcgis')\n```\n\n","completion":{"label":"Portal","detail":"Portal(url) -> Portal","insertText":"Portal(${1:url_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a reference to an ArcGIS Portal.\n\n**Parameter**\n\n- **url**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The url of the portal.\n\n**Return value**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"portal","bundle":"data-access","sinceVersion":"1.36","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#portal2","description":"Creates a reference to the active portal of the expression's execution context.","examples":"\n**Example**\n\nReturns the url of the active portal of the environment where the expression executes.\n\n```arcade\nPortal().url\n```\n\n","completion":{"label":"Portal","detail":"Portal() -> Portal","insertText":"Portal($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.36](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a reference to the active portal of the expression's execution context.\n\n**Return value**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal)"}},"parametersInfo":{"min":0,"max":0}}]]},{"id":"text_functions","title":"Text functions","items":[{"type":"function","name":"concatenate","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#concatenate","description":"Concatenates values together and returns a text value.","examples":"\n**Example**\n\nprints 'red/blue/green'\n\n```arcade\nConcatenate(['red', 'blue', 'green'], '/')\n```\n\n","completion":{"label":"Concatenate","detail":"Concatenate(values?, separator?, format?) -> Text","insertText":"Concatenate($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConcatenates values together and returns a text value.\n\n**Parameters**\n\n- **values** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of text values to concatenate.\n- **separator** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Separator to use for concatenation if `values` parameter is an array. Or text to concatenate, if a single value is provided for the first parameter. If not provided will be empty.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Special formatting characters for dates or numbers. This parameter is available in Arcade version 1.3 and later. \nPossible values: \n - `0`: Digit \n - `#`: Digit, omitting leading/trailing zeros \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `SSS`: Milliseconds, padded (000 - 999) \n - `A`: AM/PM \n - `Z`: Time zone offset in narrow hours +/- UTC (e.g. `-7` or `+11`) \n - `ZZ`: Time zone offset in hours +/- UTC (e.g. `-07:00` or `+11:00`) \n - `ZZZ`: Time zone offset in compact hours +/- UTC (e.g. `-0700` or `+1100`) \n - `ZZZZ`: Abbreviated named time zone (e.g. `EST`) \n - `ZZZZZ`: Named time zone (e.g. `Eastern Standard Time`) \n\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":3}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#count","description":"Returns the number of characters in a text value.","examples":"\n**Example**\n\nReturns 13\n\n```arcade\nCount('Graham County')\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of characters in a text value.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"find","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#find","description":"Finds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of `-1` indicates no results were found.","examples":"\n**Example**\n\nprints 6\n\n```arcade\nFind('380', 'Esri, 380 New York Street', 0)\n```\n\n","completion":{"label":"Find","detail":"Find(searchText, targetText, startPosition?) -> Number","insertText":"Find(${1:searchText_}, ${2:targetText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nFinds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of `-1` indicates no results were found.\n\n**Parameters**\n\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search for.\n- **targetText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search.\n- **startPosition** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The zero-based index of the character in the text to search from.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"fromcharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcharcode","description":"Returns a text value created from a sequence of UTF-16 character codes.","examples":"\n**Examples**\n\nThe following example returns 'XYZ'\n\n```arcade\nFromCharCode(88,89,90)\n// returns 'XYZ'\n```\n\nThe following example returns '🌉'\n\n```arcade\nFromCharCode(55356, 57097)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCharCode","detail":"FromCharCode(charCode1, [charCode2, ..., charCodeN]?) -> Text","insertText":"FromCharCode(${1:charCode1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a text value created from a sequence of UTF-16 character codes.\n\n**Parameters**\n\n- **charCode1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing UTF-16 code units. Each unit has a range of 0-65535.\n- **[charCode2, ..., charCodeN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A sequence of numbers representing UTF-16 code units. Each unit has a range of 0-65535.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"fromcodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcodepoint","description":"Returns a text value created from a sequence of UTF-32 code points.","examples":"\n**Examples**\n\nThe following example returns 'XYZ'\n\n```arcade\nFromCodePoint(88,89,90)\n// returns 'XYZ'\n```\n\nThe following example returns '🌉'\n\n```arcade\nFromCodePoint(127753)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCodePoint","detail":"FromCodePoint(codePoint1, [codePoint2, ..., codePoint1N]?) -> Text","insertText":"FromCodePoint(${1:codePoint1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a text value created from a sequence of UTF-32 code points.\n\n**Parameters**\n\n- **codePoint1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A code point.\n- **[codePoint2, ..., codePoint1N]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of code points\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"guid","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#guid","description":"Returns a random GUID as a text value.","examples":"\n**Examples**\n\nReturns a value similar to `{db894515-ed21-4df1-af67-36232256f59a}`\n\n```arcade\nGuid()\n```\n\nReturns a value similar to `d00cf4dffb184caeb8ed105b2228c247`\n\n```arcade\nGuid('digits')\n```\n\n","completion":{"label":"Guid","detail":"Guid(guidFormat?) -> Text","insertText":"Guid($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a random GUID as a text value.\n\n**Parameter**\n\n- **guidFormat** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An named format for the GUID. The default value is `digits-hyphen-braces`. \nPossible Values: `digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"left","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#left","description":"Returns the specified number of characters from the beginning of a text value.","examples":"\n**Example**\n\nprints 'the'\n\n```arcade\nLeft('the quick brown fox', 3)\n```\n\n","completion":{"label":"Left","detail":"Left(value, charCount) -> Text","insertText":"Left(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the specified number of characters from the beginning of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value from which to get characters.\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to get from the beginning of the text.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"lower","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#lower","description":"Makes a text value lower case.","examples":"\n**Example**\n\nprints 'hello'\n\n```arcade\nLower('HELLO')\n```\n\n","completion":{"label":"Lower","detail":"Lower(inputText) -> Text","insertText":"Lower(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nMakes a text value lower case.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to be made lowercase.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mid","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#mid","description":"Gets a number of characters from the middle of a text value.","examples":"\n**Example**\n\nprints 'quick'\n\n```arcade\nMid('the quick brown fox', 4, 5)\n```\n\n","completion":{"label":"Mid","detail":"Mid(value, startPosition, charCount?) -> Text","insertText":"Mid(${1:value_}, ${2:startPosition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGets a number of characters from the middle of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value from which to get characters. If the value is not of type Text, the value is first converted to Text.\n- **startPosition**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The starting position from which to get the text. 0 is the first position.\n- **charCount** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to extract. If omitted, extracts characters to the end of the Text\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"proper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#proper","description":"Converts a text value to title case. By default, the beginning of every word is capitalized. The option `firstword` will capitalize only the first word.","examples":"\n**Example**\n\nprints 'The Quick Brown Fox'\n\n```arcade\nProper('the quick brown fox', 'everyword')\n```\n\n","completion":{"label":"Proper","detail":"Proper(inputText, applyToText?) -> Text","insertText":"Proper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a text value to title case. By default, the beginning of every word is capitalized. The option `firstword` will capitalize only the first word.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to convert to title case.\n- **applyToText** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value specifying the type of capitalization to be performed. By default every word is capitalized. This parameter accepts one of two values: `everyword` or `firstword`.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"replace","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#replace","description":"Replaces characters within a text value. Defaults to replacing all occurrences.","examples":"\n**Example**\n\nprints 'the quick red fox'\n\n```arcade\nReplace('the quick brown fox', 'brown', 'red')\n```\n\n","completion":{"label":"Replace","detail":"Replace(value, searchText, replacementText, allOccurrences?) -> Text","insertText":"Replace(${1:value_}, ${2:searchText_}, ${3:replacementText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReplaces characters within a text value. Defaults to replacing all occurrences.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text in which to make replacements.\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search for.\n- **replacementText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The replacement text.\n- **allOccurrences** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if all occurrences of the `searchText` should be replaced in the text. Defaults to `true`.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"right","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#right","description":"Returns the specified number of characters from the end of a text value.","examples":"\n**Example**\n\nprints 'fox'\n\n```arcade\nRight('the quick brown fox', 3)\n```\n\n","completion":{"label":"Right","detail":"Right(value, charCount) -> Text","insertText":"Right(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the specified number of characters from the end of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get characters.\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to get from the end of the text value.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"split","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#split","description":"Splits a text value into an array.","examples":"\n**Examples**\n\nreturns '[red,green]'\n\n```arcade\nSplit('red,green,blue,orange', ',', 2)\n```\n\nSplits the paragraph at each space an unlimited number of times. Returns an array of the words in the paragraph.\n\n```arcade\nSplit(paragraph, ' ', -1, true)\n```\n\n","completion":{"label":"Split","detail":"Split(inputText, separatorText, limit?, removeEmpty?) -> Array<Text>","insertText":"Split(${1:inputText_}, ${2:separatorText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSplits a text value into an array.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text value to be split.\n- **separatorText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The separator used to split the text.\n- **limit** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An integer that specifies the number of splits. The default is `-1`, which indicates an unlimited number of splits.\n- **removeEmpty** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to remove empty values. By default this is `false`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)>"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"standardizefilename","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizefilename","description":"Returns a standardized, formatted filename based on the following character substitution rules. The field value characters will be returned in a standardized format as designated below. \n- Forward slash (`/`) → Hyphen (`-`) \n- Backslash (`\\`) → Hyphen (`-`) \n- Pipe or vertical line (`|`) → Hyphen (`-`) \n- Asterisk (`*`) → Underscore (`_`) \n- Less than (`<`) → Underscore (`_`) \n- Greater than (`>`) → Underscore (`_`) \n- Question mark (`?`) → Underscore (`_`) \n- Colon (`:`) → A comma followed by a space (`, `)","examples":"\n**Example**\n\n```arcade\nvar rawFilename = \"USGS:Green River, Utah\";\nreturn StandardizeFilename(rawFilename);\n// Returns a value of \"USGS, Green River, Utah\".\n```\n\n","completion":{"label":"StandardizeFilename","detail":"StandardizeFilename(inputFilename) -> Text","insertText":"StandardizeFilename(${1:inputFilename_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a standardized, formatted filename based on the following character substitution rules. The field value characters will be returned in a standardized format as designated below. \n- Forward slash (`/`) → Hyphen (`-`) \n- Backslash (`\\`) → Hyphen (`-`) \n- Pipe or vertical line (`|`) → Hyphen (`-`) \n- Asterisk (`*`) → Underscore (`_`) \n- Less than (`<`) → Underscore (`_`) \n- Greater than (`>`) → Underscore (`_`) \n- Question mark (`?`) → Underscore (`_`) \n- Colon (`:`) → A comma followed by a space (`, `)\n\n**Parameter**\n\n- **inputFilename**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input filename to standardize.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"standardizeguid","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizeguid","description":"Returns a standardized, formatted GUID string.","examples":"\n**Examples**\n\nConverts a GUID to `digits` format\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits')\n// Returns a value of 4e6f776dc2984b4b86a457103b4d0f4a\n```\n\nConverts a GUID to `digits-hyphen` format\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits-hyphen')\n// Returns a value of 4e6f776d-c298-4b4b-86a4-57103b4d0f4a\n```\n\n","completion":{"label":"StandardizeGuid","detail":"StandardizeGuid(inputGuid, format) -> Text","insertText":"StandardizeGuid(${1:inputGuid_}, ${2:format_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a standardized, formatted GUID string.\n\n**Parameters**\n\n- **inputGuid**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input GUID in any format to standardize.\n- **format**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A named format for the GUID. \nPossible Values: `digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"text","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#text","description":"Converts any value into a text value. An optional `format` parameter is provided to allow for formatting date and number data inputs. Returns `null` if an equivalent text conversion cannot be determined.","examples":"\n**Examples**\n\nPad the number to the left of the decimal\n\n```arcade\nText(123, '0000') // '0123'\n```\n\nRestrict the number to the left of the decimal\n\n```arcade\nText(123, '00') // '23'\n```\n\nGroup the number by thousands\n\n```arcade\nText(1234, '#,###') // '1,234'\n```\n\nRound the number to two decimal places\n\n```arcade\nText(12345678.123, '#,###.00') // '12,345,678.12'\n```\n\nFormat number as currency\n\n```arcade\nText(1234.55, '$#,###.00') // '$1,234.55'\n```\n\nRound the number to two decimal places\n\n```arcade\nText(1.236, '#.00') // '1.24'\n```\n\nMaintain significant digits and group by thousands\n\n```arcade\nText(1234.5678, '#,##0.00#') // '1,234.568'\n```\n\nFormat the number and format positive/negative - if there is a negative subpattern, it serves only to specify the negative prefix and suffix\n\n```arcade\nText(-2, 'Floor #;Basement #') // 'Basement 2'\n```\n\n```arcade\nText(2, 'Floor #;Basement #') // 'Floor 2'\n```\n\nMultiply by 100 and format as percentage\n\n```arcade\nText(0.3, '#%') // '30%'\n```\n\nFormat date and time at the moment. eg 'Tuesday, October 25, 2016 @ 08:43:11'\n\n```arcade\nText(Now(), 'dddd, MMMM D, Y @ h:m:s')\n```\n\nFormats the date and time with the timezone\n\n```arcade\nText(startDate, 'ddd, MMM D, Y h:mm:ss A ZZZZ')\n// returns Thu, Sep 14, 2023 10:04:49 AM PDT\n```\n\n","completion":{"label":"Text","detail":"Text(value, format?) -> Text","insertText":"Text(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts any value into a text value. An optional `format` parameter is provided to allow for formatting date and number data inputs. Returns `null` if an equivalent text conversion cannot be determined.\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A value (i.e. date, number or other data type) to be converted to text. Starting at version 1.25, Polygon or Polyline inputs may return JSON containing curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Special characters for formatting dates or numbers. \nPossible values: \n - `0`: Digit \n - `#`: Digit, omitting leading/trailing zeros \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `SSS`: Milliseconds, padded (000 - 999) \n - `A`: AM/PM \n - `Z`: Time zone offset in narrow hours +/- UTC (e.g. `-7` or `+11`) \n - `ZZ`: Time zone offset in hours +/- UTC (e.g. `-07:00` or `+11:00`) \n - `ZZZ`: Time zone offset in compact hours +/- UTC (e.g. `-0700` or `+1100`) \n - `ZZZZ`: Abbreviated named time zone (e.g. `EST`) \n - `ZZZZZ`: Named time zone (e.g. `Eastern Standard Time`) \n\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocharcode","description":"Returns a number between 0 and 65535 representing the UTF-16 code unit at the given index. Invalid halves of surrogate pairs are automatically removed.","examples":"\n**Examples**\n\nThe following example returns 88, the Unicode value for X.\n\n```arcade\nToCharCode('XYZ')\n// returns 88\n```\n\nThe following example returns 89, the Unicode value for Y.\n\n```arcade\nToCharCode('XYZ', 1)\n// returns 89\n```\n\nThe following example returns 65535.\n\n```arcade\nToCharCode('\\uFFFF\\uFFFE')\n// returns 65535\n```\n\nThe following example returns 55356.\n\n```arcade\nToCharCode('🌉')\n// returns 55356\n```\n\nThe following example returns 57097.\n\n```arcade\nToCharCode('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCharCode","detail":"ToCharCode(inputText, index?) -> Number","insertText":"ToCharCode(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a number between 0 and 65535 representing the UTF-16 code unit at the given index. Invalid halves of surrogate pairs are automatically removed.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get a UTF-16 code unit value.\n- **index** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An integer with a value of at least 0 and no greater than the number of characters of `inputText`. By default, this value is 0.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocodepoint","description":"Returns a non-negative number representing the UTF-32 code point value of the input text. If indexed into the first half of a surrogate pair, the whole code point is returned. If indexed into the second half of the pair, this function returns the value of the second half. If a large code isn't a valid character, the function returns only the value of the half it indexes into.","examples":"\n**Examples**\n\nThe following example returns 88, the Unicode value for X.\n\n```arcade\nToCodePoint('XYZ')\n// returns 88\n```\n\nThe following example returns 89, the Unicode value for Y.\n\n```arcade\nToCodePoint('XYZ', 1)\n// returns 89\n```\n\nThe following example returns 127753.\n\n```arcade\nToCodePoint('🌉')\n// returns 127753\n```\n\nThe following example returns 57097.\n\n```arcade\nToCodePoint('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCodePoint","detail":"ToCodePoint(inputText, position?) -> Number","insertText":"ToCodePoint(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a non-negative number representing the UTF-32 code point value of the input text. If indexed into the first half of a surrogate pair, the whole code point is returned. If indexed into the second half of the pair, this function returns the value of the second half. If a large code isn't a valid character, the function returns only the value of the half it indexes into.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get a UTF-32 code point value.\n- **position** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Position of a character in `inputText` from which to return the code point value. By default this value is 0.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tohex","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tohex","description":"Converts an integer to a hexidecimal representation.","examples":"\n**Examples**\n\nReturns `\"64\"`.\n\n```arcade\nToHex(100)\n```\n\nReturns the hexidecimal representation for the color royal blue, `\"#4169E1\"`, from its RGB values\n\n```arcade\nvar r = ToHex(65); // returns \"41\"\nvar g = ToHex(105); // returns \"69\"\nvar b = ToHex(225); // returns \"E1\"\nConcatenate(\"#\",r,g,b)\n// Returns \"#4169E1\"\n```\n\n","completion":{"label":"ToHex","detail":"ToHex(value) -> Text","insertText":"ToHex(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts an integer to a hexidecimal representation.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to be converted to a hexidecimal value.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trim","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#trim","description":"Removes spaces from the beginning or end of an input text value.","examples":"\n**Example**\n\nprints 'hello world'\n\n```arcade\nTrim(' hello world')\n```\n\n","completion":{"label":"Trim","detail":"Trim(inputText) -> Text","insertText":"Trim(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves spaces from the beginning or end of an input text value.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to be trimmed.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"upper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#upper","description":"Makes text upper case.","examples":"\n**Example**\n\nprints 'HELLO'\n\n```arcade\nUpper('Hello')\n```\n\n","completion":{"label":"Upper","detail":"Upper(inputText) -> Text","insertText":"Upper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nMakes text upper case.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text value to be made uppercase.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"urlencode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode","description":"Encodes a URL by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.","examples":"\n**Example**\n\nEncodes the URL provided\n\n```arcade\nvar urlsource ='arcgis-survey123://?';\nvar params = {\n itemID:'36ff9e8c13e042a58cfce4ad87f55d19',\n center: '43.567,-117.380'\n};\nreturn urlsource + UrlEncode(params);\n//arcgis-survey123://?center=43.567%2C-117.380&itemID=36ff9e8c13e042a58cfce4ad87f55d19\n```\n\n","completion":{"label":"UrlEncode","detail":"UrlEncode(textOrDictionary) -> Text","insertText":"UrlEncode(${1:textOrDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEncodes a URL by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\n**Parameter**\n\n- **textOrDictionary**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The URL to be encoded.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"track_functions","title":"Track functions","items":[{"type":"function","name":"trackaccelerationat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationat","description":"The acceleration at the observation relative to the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In this example, we examine results of feature 1 (p1) with a `value` of 1. The result is equal to the acceleration of feature 2 (p2).\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(1)\naccelerationAt;\n// returns 0.0167\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In this example, we examine results of feature 1 (p1) with a `value` of 3. The result is equal to the acceleration of feature 4 (p4).\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(3)\naccelerationAt;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackAccelerationAt","detail":"TrackAccelerationAt(value) -> Number","insertText":"TrackAccelerationAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration at the observation relative to the current observation.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features before or after the current observation. \nThe current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackaccelerationwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationwindow","description":"The acceleration values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the acceleration value for each feature in the specified window. Accelerations are calculated in meters per second squared. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(-1, 2)\naccelerationWindow;\n// returns [0.0167, 0.0056, -0.0014]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the acceleration value for each feature in the specified window. Accelerations are calculated in meters per second squared. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `1` and an `endIndex` of `3`.\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(1, 3)\naccelerationWindow;\n// returns [-0.0014, 0.0014, -0.0028]\n```\n\n","completion":{"label":"TrackAccelerationWindow","detail":"TrackAccelerationWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackAccelerationWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackcurrentacceleration","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentacceleration","description":"The acceleration of the current observation measured between the previous observation and the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In the first example, we examine results of feature 2 (p2).\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns 0.0167\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In the following example, we examine results of feature 4 (p4).\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackCurrentAcceleration","detail":"TrackCurrentAcceleration() -> Number","insertText":"TrackCurrentAcceleration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration of the current observation measured between the previous observation and the current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentdistance","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentdistance","description":"The sum of the distances travelled between observations from the first to current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a value for the current feature in the track. In the first example, we examine results for feature 3 (p3). The calculation is `80 + 60 = 140`.\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 140\n```\n\nYour track has six features, as seen above. The expression returns a value for the current feature in the track. Your track has six features, as seen above. The expression returns a value for each feature in the track. In the following example, we examine results for feature 6 (p6). The calculation is `25 + 35 + 30 + 80 + 60 = 230`.\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 230\n```\n\n","completion":{"label":"TrackCurrentDistance","detail":"TrackCurrentDistance() -> Number","insertText":"TrackCurrentDistance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe sum of the distances travelled between observations from the first to current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentspeed","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentspeed","description":"The speed between the previous observation and the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the first example, we examine results of feature 2 (p2). The calculation is `60/60`.\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 1\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the following example, we examine results of feature 6 (p6). The calculation is `25/60`.\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 0.4167\n```\n\n","completion":{"label":"TrackCurrentSpeed","detail":"TrackCurrentSpeed() -> Number","insertText":"TrackCurrentSpeed($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed between the previous observation and the current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrenttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrenttime","description":"Calculates the time on the current feature in a track.","examples":"\n**Example**\n\nReturns the time of the current feature being evaluated. For example, given a track with three features at January 1, 2012, December 9, 2012, and May 3, 2013 the current time will be evaluated for each feature. In this example, it's evaluated at the middle feature, December 9, 2012.\n\n```arcade\nTrackCurrentTime();\n// returns December 9, 2012\n```\n\n","completion":{"label":"TrackCurrentTime","detail":"TrackCurrentTime() -> Date","insertText":"TrackCurrentTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the time on the current feature in a track.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackdistanceat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistanceat","description":"The sum of the distances travelled between observations from the first to the current observation plus the given value.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a value for each feature in the track. In the first example, we examine results when evaluated at feature 2 (p2) with an index value of 2. The calculation is `30 + 80 + 60 = 170`.\n\n```arcade\nTrackDistanceAt(2)\n// returns 170\n```\n\nYour track has six features, as seen above. The expression returns a value for each feature in the track. In the following example, we examine results when evaluated at feature 4 (p4) with an index value of 4. The calculation is `25 + 35 + 30 + 80 + 60 = 230`.\n\n```arcade\nTrackDistanceAt(4)\n// returns 230\n```\n\n","completion":{"label":"TrackDistanceAt","detail":"TrackDistanceAt(index) -> Number","insertText":"TrackDistanceAt(${1:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe sum of the distances travelled between observations from the first to the current observation plus the given value.\n\n**Parameter**\n\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the track feature to calculate distance for. For example, a value of `2` would calculate the distance from the first feature (index `0`) in the track to the third feature (index `2`) in the track.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackdistancewindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistancewindow","description":"The distances between the first value (inclusive) to the last value (exclusive) in a window about the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the distance value for each feature in the window. In the first example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [60, 140, 170]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the distance value for each feature in the window. In the following example, we examine results of feature 5 (p5) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [170, 205, 230]\n```\n\n","completion":{"label":"TrackDistanceWindow","detail":"TrackDistanceWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackDistanceWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe distances between the first value (inclusive) to the last value (exclusive) in a window about the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackduration","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackduration","description":"Calculates the duration of the track from the start feature to the current feature in milliseconds from epoch.","examples":"\n**Example**\n\nReturns the duration of a track that starts on January 1, 2012 until the current feature at May 3, 2013.\n\n```arcade\nTrackDuration();\n// returns 42163200000\n```\n\n","completion":{"label":"TrackDuration","detail":"TrackDuration() -> Number","insertText":"TrackDuration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the duration of the track from the start feature to the current feature in milliseconds from epoch.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackfieldwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackfieldwindow","description":"Returns an array of attribute values from the specified `field` for the specified time span. The window function allows you to go forward and backward in time.","examples":"\n**Examples**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. Results are returned inclusive of the start feature, and exclusive of the end feature. This example is evaluated at the second feature (20) and returns an array of the previous value (-1, inclusive).\n\n```arcade\nvar window = TrackFieldWindow('MyField', -1,0)\nwindow;\n// returns [10]\n```\n\nYour track has a field named `Speed` with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature. \n\n```arcade\nvar window = TrackFieldWindow('Speed', -2,2)\nwindow;\n// returns [10,20,30,40]\n```\n\n","completion":{"label":"TrackFieldWindow","detail":"TrackFieldWindow(fieldName, startIndex, endIndex) -> Array<Number>","insertText":"TrackFieldWindow(${1:fieldName_}, ${2:startIndex_}, ${3:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of attribute values from the specified `field` for the specified time span. The window function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name from which to return values.\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"trackgeometrywindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackgeometrywindow","description":"Returns an array of geometries for the specified time indices. The window function allows you to go forward and backward in time.","examples":"\n**Example**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature\n\n```arcade\nvar window = TrackGeometryWindow(-2,2)\nwindow;\n// returns [{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}]\n```\n\n","completion":{"label":"TrackGeometryWindow","detail":"TrackGeometryWindow(startIndex, endIndex) -> Array<Geometry>","insertText":"TrackGeometryWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of geometries for the specified time indices. The window function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackindex","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackindex","description":"Returns the index of the feature being calculated. Features are indexed in order of time within a track.","examples":"\n**Example**\n\nReturns the index of the first feature in a track.\n\n```arcade\nTrackIndex() // returns 0\n```\n\n","completion":{"label":"TrackIndex","detail":"TrackIndex() -> Number","insertText":"TrackIndex($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the index of the feature being calculated. Features are indexed in order of time within a track.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackspeedat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedat","description":"The speed at the observation relative to the current observation. For example, at value 2, it's the speed at the observation two observations after the current.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the first example, we examine results of feature 1 (p1) with a `value` of 2. The calculation is `80/60`.\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1.33\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the following example, we examine results of feature 3 (p3) with a `value` of -1. The calculation is `60/60`.\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1\n```\n\n","completion":{"label":"TrackSpeedAt","detail":"TrackSpeedAt(value) -> Number","insertText":"TrackSpeedAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed at the observation relative to the current observation. For example, at value 2, it's the speed at the observation two observations after the current.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features before or after the current observation. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackspeedwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedwindow","description":"The speed values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the speed value for each feature in the specified window. Speeds are calculated in meters per second. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar speedWindow = TrackSpeedWindow(-1, 2)\nspeedWindow // returns [1, 1.3, 0.5]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the speed value for each feature in the specified window. Speeds are calculated in meters per second. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `1` and an `endIndex` of `3`.\n\n```arcade\nvar speedWindow = TrackSpeedWindow(1,3)\nspeedWindow // returns [0.5, 0.583, 0.4167]\n```\n\n","completion":{"label":"TrackSpeedWindow","detail":"TrackSpeedWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackSpeedWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackstarttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackstarttime","description":"Calculates the start time of a track.","examples":"\n**Example**\n\nReturns the start time of a track that spans from January 1, 2012 to May 3, 2013.\n\n```arcade\nTrackStartTime() // returns January 1, 2012\n```\n\n","completion":{"label":"TrackStartTime","detail":"TrackStartTime() -> Date","insertText":"TrackStartTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the start time of a track.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackwindow","description":"Returns an array of features for the specified time index. This function allows you to go forward and backward in time.","examples":"\n**Examples**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. Results are returned inclusive of the start feature, and exclusive of the end feature. This example is evaluated at the second feature (20) and returns an array of a single value -- the previous feature.\n\n```arcade\nvar window = TrackWindow(-1,0)\nwindow;\n// returns [{'geometry': {x: 1, y: 1}}, {'attributes': {'MyField' : 10, 'trackName':'ExampleTrack1'}}]\n```\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature.\n\n```arcade\nvar window = TrackWindow(-2,2)\nwindow;\n/* returns\n[{\n geometry: [{\n x: 1,\n y: 1\n }, {\n x: 2,\n y: 2\n }, {\n x: null,\n y: null\n }, {\n x: 4,\n y: 4\n }]\n}, {\n attributes: [{\n MyField: 10,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 20,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 30,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 40,\n trackName: 'ExampleTrack1'\n }]\n}]\n```\n\n","completion":{"label":"TrackWindow","detail":"TrackWindow(startIndex, endIndex) -> Array<Feature>","insertText":"TrackWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of features for the specified time index. This function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)>"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"voxel_functions","title":"Voxel functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#defaultvalue","description":"Returns a specified default value if a field name in a voxel does not exist or the value of the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"n/a\" if voxel attribute does not exist or is empty\n\n```arcade\nDefaultValue($voxel, \"sea_temp\", \"n/a\")\n// Returns the sea_temp value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputVoxel, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputVoxel_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a voxel does not exist or the value of the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The input voxel to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value of the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#haskey","description":"Indicates whether a voxel has the input key.","examples":"\n**Example**\n\nReturns `true` if the voxel has a field named `sea_temp`\n\n```arcade\nHasKey($voxel, 'sea_temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputVoxel, key) -> Boolean","insertText":"HasKey(${1:inputVoxel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a voxel has the input key.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to check for a field name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#hasvalue","description":"Indicates whether a voxel has a given field and if that field has a value.","examples":"\n**Example**\n\nReturn false if voxel attribute does not exist or is empty\n\n```arcade\niif(HasValue($voxel, \"sea_temp\"), ($voxel.sea_temp - 32) * 5/9, false)\n// Returns the temp in celsius if sea_temp is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputVoxel, fieldName) -> Boolean","insertText":"HasValue(${1:inputVoxel_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a voxel has a given field and if that field has a value.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}}]}]
|
|
1
|
+
[{"id":"constants","title":"Constants","items":[{"type":"constant","name":"infinity","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#infinity","description":"Represents a value greater than any other number. `-Infinity` may also be used as a value smaller than any number.","examples":"\n**Example**\n\nCalculates the maximum of four field values\n\n```arcade\nvar values = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4 ];\nvar maxValue = -Infinity;\n\nfor(var i in values){\n maxValue = IIF(values[i] > maxValue, values[i], maxValue);\n}\n\nreturn maxValue;\n```\n\n","completion":{"label":"Infinity","detail":"Infinity","insertText":"Infinity","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRepresents a value greater than any other number. `-Infinity` may also be used as a value smaller than any number."}}},{"type":"constant","name":"nan","bundle":"core","sinceVersion":"1.36","link":"https://developers.arcgis.com/arcade/function-reference/constants/#nan","description":"Represents a value that is not a number (NaN).","examples":"","completion":{"label":"NaN","detail":"NaN","insertText":"NaN","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.36](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRepresents a value that is not a number (NaN)."}}},{"type":"constant","name":"pi","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#pi","description":"The value of a circle's circumference divided by its diameter, approximately `3.14159`.","examples":"\n**Example**\n\nReturns the area of a circle feature\n\n```arcade\nvar r = $feature.radius;\nPI * r * r;\n```\n\n","completion":{"label":"PI","detail":"PI","insertText":"PI","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe value of a circle's circumference divided by its diameter, approximately `3.14159`."}}},{"type":"constant","name":"textformatting.backwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.backwardslash","description":"Inserts a backslash character `\\` into the text.","examples":"\n**Example**\n\nReturns '\\\\\\serverName\\foo\\bar'\n\n```arcade\nTextFormatting.BackwardSlash + TextFormatting.BackwardSlash + $feature.FILE_PATH\n```\n\n","completion":{"label":"TextFormatting.BackwardSlash","detail":"TextFormatting.BackwardSlash","insertText":"TextFormatting.BackwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a backslash character `\\` into the text."}}},{"type":"constant","name":"textformatting.doublequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.doublequote","description":"Inserts a double quote character `\"` into the text.","examples":"\n**Example**\n\nReturns 'Nicholas \"Nick\" Anderson'\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.DoubleQuote + $feature.ALIAS + TextFormatting.DoubleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.DoubleQuote","detail":"TextFormatting.DoubleQuote","insertText":"TextFormatting.DoubleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a double quote character `\"` into the text."}}},{"type":"constant","name":"textformatting.forwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.forwardslash","description":"Inserts a forward slash character `/` into the text.","examples":"\n**Example**\n\nReturns '151/low'\n\n```arcade\n$feature.POP_DENSITY + TextFormatting.ForwardSlash + $feature.CLASS\n```\n\n","completion":{"label":"TextFormatting.ForwardSlash","detail":"TextFormatting.ForwardSlash","insertText":"TextFormatting.ForwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a forward slash character `/` into the text."}}},{"type":"constant","name":"textformatting.newline","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.newline","description":"Inserts a new line, or line break, into the text. Multi-line labels are **NOT** supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online Map Viewer Classic.","examples":"\n**Example**\n\nReturns \"T2N \nR1W\"\n\n```arcade\n\"T\" + $feature.TOWNSHIP + TextFormatting.NewLine + \"R\" + $feature.RANGE\n```\n\n","completion":{"label":"TextFormatting.NewLine","detail":"TextFormatting.NewLine","insertText":"TextFormatting.NewLine","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a new line, or line break, into the text. Multi-line labels are **NOT** supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online Map Viewer Classic."}}},{"type":"constant","name":"textformatting.singlequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.singlequote","description":"Inserts a single quote character `'` into the text.","examples":"\n**Example**\n\nReturns \"Nicholas 'Nick' Anderson\"\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.SingleQuote + $feature.ALIAS + TextFormatting.SingleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.SingleQuote","detail":"TextFormatting.SingleQuote","insertText":"TextFormatting.SingleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a single quote character `'` into the text."}}}]},{"id":"ai_functions","title":"AI functions","items":[{"type":"function","name":"translatetext","bundle":"ai","sinceVersion":"1.32","link":"https://developers.arcgis.com/arcade/function-reference/ai_functions/#translatetext","description":"_This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page. AI functions are currently not supported in ArcGIS Enterprise._\n\nTranslates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output.","examples":"\n**Example**\n\nTranslates the text 'Hello world' to the locale of the client or system.\n\n```arcade\nvar locale = GetEnvironment().locale;\nvar result = TranslateText('Hello world', locale);\n// result will be a dictionary with the translated text\nif (result.success){\n if(HasValue(result, [\"results\", 0, \"translation\"])){\n // returns \"Hola mundo\" if the device locale is 'es'\n return result.results[0].translation[locale];\n }\n if (HasValue(result, [\"results\", 0, \"text\"])){\n // returns \"Hello world\" if translation could not be performed\n return result.results[0].text;\n }\n}\nreturn \"Translation not successful\";\n```\n\n","completion":{"label":"TranslateText","detail":"TranslateText(inputText, toLanguages, fromLanguage?) -> Dictionary","insertText":"TranslateText(${1:inputText_}, ${2:toLanguages_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.32](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n_This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page. AI functions are currently not supported in ArcGIS Enterprise._\n\nTranslates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The text to translate. This can be a single text value or an array of text values.\n- **toLanguages**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The target language(s) to translate to. This can be a single language code or an array of language codes.\n- **fromLanguage** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The source language of the input text. If not specified, the service will attempt to auto-detect the source language.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nA dictionary containing the translated text.\n\n- **success**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether the translation was successful. This value will be `false` if the use of AI services is not allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page.\n- **results**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries containing the translation results for each `inputText` value.\n\n - **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The index of the input text in the original array.\n - **text**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input text that was translated.\n - **detectedLanguage**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The detected language of the input text, if applicable.\n\n - **language**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The language code of the detected language.\n - **score**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The confidence score of the detected language. Values range from 0 to 1, where 1 indicates high confidence. A value of `-1` indicates that the language was not detected.\n - **translation**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary of translated values where the key is the language code and the value is the translation.\n\n**Additional resources**\n\n* [Supported language codes](https://developers.arcgis.com/javascript/latest/localization/#locale-support)\n"}},"parametersInfo":{"min":2,"max":3}}]},{"id":"array_functions","title":"Array functions","items":[{"type":"function","name":"all","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#all","description":"Indicates whether all of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for all items in the input array.","examples":"\n**Examples**\n\nReturns `false` because some of the elements in the input array do not pass the `isEven` test\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 }\n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since some of the values in the array did not pass the test\n// (return true), the return value will be false\nAll([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if all of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAll(myArray, isEmpty)\n```\n\n","completion":{"label":"All","detail":"All(inputArray, testFunction) -> Boolean","insertText":"All(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether all of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for all items in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to test each element in the array `testFunction(value: Any) -> Boolean`. The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if the test function returns a truthy value for all the elements."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"any","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#any","description":"Tests whether any of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for at least one item in the input array.","examples":"\n**Examples**\n\nReturns `true` because at least one element in the input array passes the `isEven` test.\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be true\nAny([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if any of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAny(myArray, isEmpty)\n```\n\n","completion":{"label":"Any","detail":"Any(inputArray, testFunction) -> Boolean","insertText":"Any(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTests whether any of the elements in a given array pass a test from the provided function. Returns `true` if the function returns `true` for at least one item in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to test each element in the array `testFunction(value: Any) -> Boolean`. The The function must return a truthy value if the element passes the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if the test function returns a truthy value for any of the elements."}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"array","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array1","description":"Returns a new array of a given length.","examples":"\n**Examples**\n\nReturns `[null, null, null, null, null]`.\n\n```arcade\nArray(5)\n```\n\nReturns `[\"hello\",\"hello\"]`\n\n```arcade\nArray(2, \"hello\")\n```\n\nReturns `[1,1,1]`.\n\n```arcade\nArray(3, 1)\n```\n\n","completion":{"label":"Array","detail":"Array(arrayLength, defaultValue?) -> Array<Any>","insertText":"Array(${1:arrayLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a new array of a given length.\n\n**Parameters**\n\n- **arrayLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The desired length for the new array.\n- **defaultValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value for each element in the array. If no value is specified, the default will be `null`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"array","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array2","description":"Returns either a shallow or deep copy of an input array.","examples":"\n**Examples**\n\nCreates a shallow copy of the input array\n\n```arcade\nvar person1 = {\n firstName: \"Jane\",\n lastName: \"Doe\"\n};\nvar person2 = {\n firstName: \"John\",\n lastName: \"Smith\"\n};\nvar people = [ person1, person2 ];\n// create a shallow copy of the array\nvar copiedArray = Array(people);\npeople[0] == copiedArray[0];\n// returns true\n// this is a shallow copy of the array, so the elements share the same references\n```\n\nCreates a deep copy of the input array\n\n```arcade\nvar deepCopy = Array(people, true);\npeople[0] == deepCopy[0]\n// returns false\n// this is a deep copy of the array, so the elements do NOT share the same references\n```\n\n","completion":{"label":"Array","detail":"Array(inputArray, deep?) -> Array<Any>","insertText":"Array(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns either a shallow or deep copy of an input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be copied.\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - When `true`, creates a deep copy of each element in the input array, meaning elements in the output array will not share the same references as the elements of the input array. Default value is `false`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"back","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#back","description":"Returns the last element of an array. If the input array is empty, then the expression evaluation will fail.","examples":"\n**Example**\n\nReturns `'gray'`.\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nBack(colors)\n```\n\n","completion":{"label":"Back","detail":"Back(inputArray) -> Any","insertText":"Back(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the last element of an array. If the input array is empty, then the expression evaluation will fail.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to get the last value from.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#count","description":"Returns the number of items in an array.","examples":"\n**Example**\n\nReturns 6\n\n```arcade\nCount([12,21,32,44,58,63])\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of items in an array.\n\n**Parameter**\n\n- **value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue1","description":"Returns a specified default value if an index in an array does not exist or the value at the specified index is `null` or an empty text value.","examples":"\n**Examples**\n\nArray with value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 4, \"No data\");\n// returns 901\n```\n\nArray with no value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 5, \"No data\");\n// returns \"No data\"\n```\n\nArray with a null value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 2, \"No data\");\n// returns \"No data\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, index, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:index_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if an index in an array does not exist or the value at the specified index is `null` or an empty text value.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to check.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the index does not exist or the value at the specified index is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue2","description":"Checks whether an index nested several levels deep in a multidimensional array has a value and returns that value if present. Otherwise, this function returns a specified default value if at least one of the nested keys or indices does not exist or the value at the specified key or index is `null` or an empty text value. This allows you to drill into a nested structure in one step rather than check values within each array.","examples":"\n**Examples**\n\nArray with a value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 3], \"No data\");\n// returns 1\n```\n\nArray with no value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 10], \"No data\");\n// returns \"No data\"\n```\n\nArray with no value at the parent index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [10, 3], \"No data\");\n// returns \"No data\"\n```\n\nArray of dictionaries with nested values\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nvar a = [ data, data2, data3 ]\nDefaultValue(a, [0, \"weather\",\"precipitation\",\"values\", 6], \"No data\");\n// returns 1\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether an index nested several levels deep in a multidimensional array has a value and returns that value if present. Otherwise, this function returns a specified default value if at least one of the nested keys or indices does not exist or the value at the specified key or index is `null` or an empty text value. This allows you to drill into a nested structure in one step rather than check values within each array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct1","description":"Returns a set of distinct, or unique, values for an array of values.","examples":"\n**Example**\n\n```arcade\nDistinct([1,1,2,1,1,2,2,3,4,5])\n// Returns [1,2,3,4,5]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(values) -> Array<Any>","insertText":"Distinct(${1:values_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values for an array of values.\n\n**Parameter**\n\n- **values**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of values on which to perform the operation.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct2","description":"Returns a set of distinct, or unique, values for a list of values.","examples":"\n**Example**\n\n```arcade\nDistinct('high','medium','low',0,'high','high','low')\n// Returns ['high','medium','low',0]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct([value1, ..., valueN]?) -> Array<Any>","insertText":"Distinct($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values for a list of values.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A list of values on which to perform the operation.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"erase","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#erase","description":"Removes a value from an array at a given index. Existing elements positioned at or above the given index will shift down one index value. The array decreases in size by one.","examples":"\n**Examples**\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, 1)\n// colors = ['orange','gray']\n```\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, -1)\n// colors = ['orange','purple']\n```\n\n","completion":{"label":"Erase","detail":"Erase(inputArray, index) -> Null","insertText":"Erase(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves a value from an array at a given index. Existing elements positioned at or above the given index will shift down one index value. The array decreases in size by one.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to remove the value from.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the value to remove from the array. If a negative index is provided, it will be used as an offset from the end of the array.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filter","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#filter","description":"Creates a new array with the elements filtered from the input array that pass a test from the provided function.","examples":"\n**Examples**\n\nReturns a new array comprised of elements that passed the `isEven` filter.\n\n```arcade\nfunction isEven(i) { return i % 2 == 0 } \nFilter([1,2,3,4,5], isEven) // Returns [2,4]\n// Since 2 and 4 are even, they are the only values\n// included in the output array.\n```\n\nUses the existing `isEmpty` Arcade function in the `filterFunction`. Returns a new array of fields that are not empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\n\nfunction isNotEmpty(value){\n return !isEmpty(value);\n}\nFilter(myArray, isNotEmpty)\n// Returns only values that are defined,\n// excluding empty values from the result\n```\n\n","completion":{"label":"Filter","detail":"Filter(inputArray, filterFunction) -> Array<Any>","insertText":"Filter(${1:inputArray_}, ${2:filterFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new array with the elements filtered from the input array that pass a test from the provided function.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to filter.\n- **filterFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function used to filter elements in the array `filterFunction(value: Any) -> Boolean`. The function must return a truthy value if the element passes the test. This function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \nReturns an array with the elements that passe the test function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#first","description":"Returns the first element in an array. Returns `null` if the array is empty.","examples":"\n**Example**\n\nprints 'orange'\n\n```arcade\nFirst(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"First","detail":"First(inputArray) -> Any","insertText":"First(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first element in an array. Returns `null` if the array is empty.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array from which to return the first item.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"front","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#front","description":"Returns the first element of an array. If the input array is empty, then the expression evaluation will fail.","examples":"\n**Example**\n\nReturns `'orange'`.\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nFront(colors)\n```\n\n","completion":{"label":"Front","detail":"Front(inputArray) -> Any","insertText":"Front(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first element of an array. If the input array is empty, then the expression evaluation will fail.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array from which to get the first value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue1","description":"Indicates whether an array has a value at the given index.","examples":"\n**Examples**\n\nArray with value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 4);\n// returns true\n```\n\nArray with no value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 5);\n// returns false\n```\n\nArray with a null value at the given index\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 2);\n// returns false\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, index) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether an array has a value at the given index.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to check.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue2","description":"Checks whether an index nested several levels deep in a multidimensional array has a value. This allows you to drill into a nested structure in one step rather than check values within each array. Returns `true` if the indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nArray with a value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 4]);\n// returns true\n```\n\nArray with no value at the nested index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 10]);\n// returns false\n```\n\nArray with no value at the parent index\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [10, 5]);\n// returns false\n```\n\nArray of dictionaries with nested values\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nvar a = [ data, data2, data3 ]\nif(HasValue(a, [0, \"weather\",\"precipitation\",\"values\", 6])){\n // This check succeeds so the value will be returned\n return a[0].weather.precipitation.values[6];\n // returns 1\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, indexes) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:indexes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether an index nested several levels deep in a multidimensional array has a value. This allows you to drill into a nested structure in one step rather than check values within each array. Returns `true` if the indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to check.\n- **indexes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"includes","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#includes","description":"Determines whether an array contains a given value. Returns `true` if the value is found within the array.","examples":"\n**Examples**\n\nReturns `true`.\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'purple')\n```\n\nReturns `false`.\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Includes","detail":"Includes(inputArray, value) -> Boolean","insertText":"Includes(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDetermines whether an array contains a given value. Returns `true` if the value is found within the array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to look for in the given array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"indexof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#indexof","description":"Returns the zero-based index location of the input item in an array. If `item` does not exist, then `-1` is returned.","examples":"\n**Example**\n\nprints 2\n\n```arcade\nvar num = [1,2,3,4];\nreturn indexof(num, 3);\n```\n\n","completion":{"label":"IndexOf","detail":"IndexOf(inputArray, item) -> Number","insertText":"IndexOf(${1:inputArray_}, ${2:item_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the zero-based index location of the input item in an array. If `item` does not exist, then `-1` is returned.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to search.\n- **item**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The item to locate in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"insert","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#insert","description":"Inserts a new value into an array at a given index. Existing elements positioned at or above the given index will shift up one index value. The array increases in size by one.","examples":"\n**Examples**\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, 1, 'yellow')\n// colors = ['orange','yellow','purple','gray']\n```\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, -1, 'yellow')\n// colors = ['orange','purple','yellow','gray']\n```\n\n","completion":{"label":"Insert","detail":"Insert(inputArray, index, value) -> Null","insertText":"Insert(${1:inputArray_}, ${2:index_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a new value into an array at a given index. Existing elements positioned at or above the given index will shift up one index value. The array increases in size by one.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to insert the new value into.\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the array where the new value should be inserted. An index of 0 will insert the value at the beginning of the array. An index that equals the size of the array will insert the value at the end of the array. An index greater than the size of the array will cause an error. If a negative index is provided, it will be used as an offset from the end of the array.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to insert into the array.\n\n**Return value**: Null"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"map","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#map","description":"Creates a new array based on results of calling a provided function on each element in the input array.","examples":"\n**Examples**\n\nConverts all of the elements in the array from Fahrenheit to Celsius and returns them in a new array.\n\n```arcade\n// This function will take in values from the input array and convert them to Celsius\nfunction toCelsius(f) {\n return Round((f - 32) * 5/9, 2)\n}\n// The toCelsius function executes for each each item\n// in the input array.\n// Map returns the resulting array of converted values.\nMap([82, 67, 96, 55, 34], toCelsius)\n// returns [27.78, 19.44, 35.56, 12.78, 1.11]\n```\n\nConverts date objects to formatted text\n\n```arcade\nvar dates = [ Date(1996, 11, 10), Date(1995, 1, 6), Date(1992, 2, 27), Date(1990, 10, 2)];\nfunction formatDates(dateVal) { return Text(dateVal, 'MMM D, Y') }\nMap(dates, formatDates);\n// returns ['Dec 10, 1996', 'Feb 6, 1995', 'Mar 27, 1992', 'Nov 2, 1990']\n```\n\n","completion":{"label":"Map","detail":"Map(inputArray, mappingFunction) -> Array<Any>","insertText":"Map(${1:inputArray_}, ${2:mappingFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new array based on results of calling a provided function on each element in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to map.\n- **mappingFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function to call on each element in the array `mappingFunction(value: Any) -> Any`. The function must return a new item that will be part of the returned array. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \nThe items returned by the mapping function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"none","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#none","description":"Tests whether none of the elements in a given array pass a test from the provided function. Returns `true` if the `testFunction` returns `false` for all items in the input array.","examples":"\n**Examples**\n\nReturns `false` because some of the elements in the input array pass the `isEven` test\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be false\nNone([1,2,3,4,5], isEven)\n```\n\nUses the existing `isEmpty` Arcade function as the `testFunction`. This is valid because `isEmpty` takes a single parameter and returns a boolean value. This expression returns `true` if none of the fields are empty.\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nNone(myArray, isEmpty)\n```\n\n","completion":{"label":"None","detail":"None(inputArray, testFunction) -> Boolean","insertText":"None(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTests whether none of the elements in a given array pass a test from the provided function. Returns `true` if the `testFunction` returns `false` for all items in the input array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to test.\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The function to test each element in the array `testFunction(value: Any) -> Boolean`. The function must return a falsy value if the element doesn't pass the test. The function can be a user-defined function or a core Arcade function defined with the following parameter:\n\n - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the value of an element in the array.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \n`true` if all the elements in the array don't pass the test function."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"pop","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#pop","description":"Removes and returns the element at the end of the array. If the array is empty, then an error is thrown.","examples":"\n**Example**\n\nReturns 'gray'. The input array will now equal `['orange', 'purple']`.\n\n```arcade\nPop(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Pop","detail":"Pop(inputArray) -> Any","insertText":"Pop(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves and returns the element at the end of the array. If the array is empty, then an error is thrown.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array from which the last element will be removed and returned.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"push","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#push","description":"Adds an element to the end of an array and returns the new length of the array.","examples":"\n**Example**\n\nReturns 4. The input array will now equal `['orange', 'purple', 'gray', 'red']`.\n\n```arcade\nPush(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Push","detail":"Push(inputArray, value) -> Number","insertText":"Push(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds an element to the end of an array and returns the new length of the array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to have elements pushed to.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to add as the last element of the input array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"reduce","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reduce","description":"Executes a provided \"reducer\" function on each element in the array, passing in the return value from the calculation of the previous element.","examples":"\n**Examples**\n\nWithout the `initialValue` parameter, the first two elements of the `cities` array are passed into the add function as arguments.\n\n```arcade\nvar cities = [{\n name: 'Columbus',\n pop: 913921\n}, {\n name: 'Cincinnati',\n pop: 307266\n}, {\n name: 'Dayton',\n pop: 140343\n}, {\n name: 'Cleveland',\n pop: 376599\n}];\n// the first time this function is called it will take the first two elements of the array as x and y\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nfunction mostPopulated(city1, city2) {\n IIf (city1.pop > city2.pop, city1, city2)\n}\nvar largestCity = Reduce(cities, mostPopulated)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Columbus is the biggest city in the list with a population of 913921\n```\n\nSince the `initialValue` parameter is set, that value will be the function's first argument (`city1`), and the first element of the `cities` will be the function's second argument (`city2`).\n\n```arcade\nvar los_angeles = { name: 'Los Angeles', pop: 3898747 }\n// since an initialValue is provided, it will be passed into the maxPop function as x\n// and the first value of the array will be passed in as y for the initial function call\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nvar largestCity = Reduce(cities, mostPopulated, los_angeles)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Los Angeles is the biggest city in the list with a population of 3898747\n```\n\n","completion":{"label":"Reduce","detail":"Reduce(inputArray, reducerFunction, initialValue?) -> Any","insertText":"Reduce(${1:inputArray_}, ${2:reducerFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nExecutes a provided \"reducer\" function on each element in the array, passing in the return value from the calculation of the previous element.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The input array to reduce.\n- **reducerFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - The reducer function that will aggregate the array values `reducerFunction(previousValue: Any, arrayValue: Any) -> Any`.\n\n - **previousValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first time the function executes, this will be the first element in the input array or the `initialValue`, if provided.\n - **arrayValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Represents the current value of an element in the input array.\n- **initialValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An item to pass into the first argument of the reducer function.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nThe value that was assembled by the reducer function for each element in the array."}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"resize","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#resize","description":"Changes the number of elements in an array to the specified size. It can be used to expand the array or truncate it early. After resizing, attempting to index beyond the new last element will result in an error, except for the case of indexing the next element, which will continue to expand the array by one element.","examples":"\n**Examples**\n\nReturns `['orange', 'purple', 'gray', null, null]`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5)\nreturn colors\n```\n\nReturns `['orange', 'purple', 'gray', 'red', 'red']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5, 'red')\nreturn colors\n```\n\nReturns `['orange']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 1)\nreturn colors\n```\n\n","completion":{"label":"Resize","detail":"Resize(inputArray, newSize, value?) -> Null","insertText":"Resize(${1:inputArray_}, ${2:newSize_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChanges the number of elements in an array to the specified size. It can be used to expand the array or truncate it early. After resizing, attempting to index beyond the new last element will result in an error, except for the case of indexing the next element, which will continue to expand the array by one element.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be resized.\n- **newSize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of elements desired in the resized array.\n- **value** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The optional value that will be used for any new elements added to the array. If no value is specified, the newly added elements will have a `null` value.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"reverse","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reverse","description":"Reverses the contents of the array in place.","examples":"\n**Example**\n\nReturns `['gray', 'purple', 'orange']`\n\n```arcade\nReverse(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Reverse","detail":"Reverse(inputArray) -> Array<Any>","insertText":"Reverse(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReverses the contents of the array in place.\n\n**Parameter**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be reversed.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"slice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#slice","description":"Returns a portion of an array between two indexes as a new array.","examples":"\n**Examples**\n\nReturns `['purple', 'gray']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 1, 3)\n```\n\nReturns `['red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 3)\n```\n\nReturns `['orange', 'purple', 'gray', 'red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'])\n```\n\nReturns `['blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], -1)\n```\n\n","completion":{"label":"Slice","detail":"Slice(inputArray, startIndex?, endIndex?) -> Array<Any>","insertText":"Slice(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a portion of an array between two indexes as a new array.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to be sliced.\n- **startIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index from which to start the slice. Defaults to `0`. If a negative index is provided, it will be used as an offset from the end of the array.\n- **endIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index where the slice will end. The value at this index will not be included in the returned array. Defaults to the array size.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"sort","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#sort","description":"Sorts an array by ASCII value. If all the items in the array are the same type, an appropriate sort function will be used. If they are different types, the items will be converted to text. If the array contains dictionaries, and no user defined function is provided, no sort will happen. If the array contains `null` values, they will not be converted to text and will be returned at the end of the sorted array. `NaN` values are converted to text and sorted according to their ASCII value.","examples":"\n**Examples**\n\nreturns `['$', 1, 'A', 'a']`\n\n```arcade\nSort([1, 'a', '$', 'A'])\n```\n\nSort using a user defined function\n\n```arcade\nvar peopleArray = [{ 'NAME': 'Sam', 'AGE': 25 }, {'NAME': 'Bob', 'AGE': 27 },{ 'NAME': 'Emma', 'AGE': 24 }];\nfunction compareAge(a,b){\n if (a['AGE']<b['AGE'])\n return -1;\n if (a['AGE']>b['AGE'])\n return 1;\n return 0;\n}\nreturn Sort(peopleArray, compareAge);\n// returns '[{ 'AGE': 24, 'NAME': 'Emma' }, { 'AGE': 25, 'NAME': 'Sam' }, { 'AGE': 27, 'NAME': 'Bob' } ]'\n```\n\n","completion":{"label":"Sort","detail":"Sort(inputArray, comparatorFunction?) -> Array<Any>","insertText":"Sort(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSorts an array by ASCII value. If all the items in the array are the same type, an appropriate sort function will be used. If they are different types, the items will be converted to text. If the array contains dictionaries, and no user defined function is provided, no sort will happen. If the array contains `null` values, they will not be converted to text and will be returned at the end of the sorted array. `NaN` values are converted to text and sorted according to their ASCII value.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to sort.\n- **comparatorFunction** (_Optional_): [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - A user defined function to be used for the sort `orderingFunction(a: Any, b: Any) -> Number`. The function receives two elements and should return a number that indicates the sorting order of the two elements: \n`> 0`: sort `b` before `a` \n`= 0`: keep the original order of `a` and `b` \n`< 0`: sort `a` before `b`\n\n - **a**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first element for comparison.\n - **b**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The second element for comparison.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"splice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#splice","description":"Concatenates all parameters together into a new array.","examples":"\n**Examples**\n\nReturns `['orange', 'purple', 1, 2, 'red']`\n\n```arcade\nSplice(['orange', 'purple'], 1, 2, 'red')\n```\n\nReturns `[1, 2, 3, 4]`\n\n```arcade\nSplice([1,2], [3,4])\n```\n\n","completion":{"label":"Splice","detail":"Splice([value1, ..., valueN]?) -> Array<Any>","insertText":"Splice($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConcatenates all parameters together into a new array.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An ongoing list of values to be spliced into a new array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"top","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#top","description":"Truncates the input array and returns the first given number of elements.","examples":"\n**Example**\n\nreturns `[ 43,32,19 ]`\n\n```arcade\nTop([ 43,32,19,0,3,55 ], 3)\n```\n\n","completion":{"label":"Top","detail":"Top(inputArray, numItems) -> Array<Any>","insertText":"Top(${1:inputArray_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTruncates the input array and returns the first given number of elements.\n\n**Parameters**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The array to truncate.\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of items to return from the beginning of the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"date_functions","title":"Date functions","items":[{"type":"function","name":"changetimezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone","description":"Changes the time zone used to display the given Date value. If the input `dateValue` has an `unknown` time zone, then the output Date value will display with the same date and time as the input `dateValue`, but will be assigned the `newTimeZone`.","examples":"\n**Examples**\n\nChanges the given Date's time zone from `America/New_York` to `America/Los_Angeles`\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"America/New_York\")\nChangeTimeZone(inputDate, \"America/Los_Angeles\");\n// returns a Date representing Nov 11, 2011, 5:00:00 AM PST\n```\n\nAssigns a Date with an `unknown` time zone to a time offset of `+07:00`\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"unknown\")\nChangeTimeZone(inputDate, \"+07:00\");\n// returns a Date representing Nov 11, 2011, 8:00:00 AM +07:00\n```\n\n","completion":{"label":"ChangeTimeZone","detail":"ChangeTimeZone(dateValue, newTimeZone) -> Date","insertText":"ChangeTimeZone(${1:dateValue_}, ${2:newTimeZone_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChanges the time zone used to display the given Date value. If the input `dateValue` has an `unknown` time zone, then the output Date value will display with the same date and time as the input `dateValue`, but will be assigned the `newTimeZone`.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value containing date and time information.\n- **newTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The new time zone that will be used to display the given Date value. The time zone must be one of the following:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [ToLocal()](https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal)\n* [ToUTC()](https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date1","description":"Creates a Date object from a set of parameters. By default, Dates are created in the time zone of the profile's execution context.","examples":"\n**Examples**\n\nCreates a Date representing the given time in the time zone of the profile's execution context running Arcade\n\n```arcade\n// Date that represents Jun 02, 1987, 12:00:00 AM PST\nDate(1987,05,02)\n```\n\nCreates a Date with time defined in a specific time zone\n\n```arcade\nDate(1990, 10, 2, 2, 23, 0, 0, \"America/New_York\");\n // Date represents Nov 2, 1990, 2:23:00 AM EST\n```\n\n","completion":{"label":"Date","detail":"Date(year, month, day, hour?, minute?, second?, millisecond?, timeZone?) -> Date","insertText":"Date(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date object from a set of parameters. By default, Dates are created in the time zone of the profile's execution context.\n\n**Parameters**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing a year.\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The month (0-11) where `0` is January and `11` is December.\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The day of the month (1-31).\n- **hour** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The hour of the day (0-23).\n- **minute** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The minute of the hour (0-59).\n- **second** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The second of the minute (0-59).\n- **millisecond** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The millisecond of the second (0-999).\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.24_ The time zone of the Date. If not specified, the Date will be created in the default time zone of the profile's execution context. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":3,"max":8}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date2","description":"Creates a Date with the given Unix epoch number. By default, the Date will display in the time zone of the profile's execution context. If no epoch is provided, creates a Date at the current date and time in the default time zone of the profile. If a `null` value is provided for the epoch, it will be implicitly cast to `0` and will return the date for January 1, 1970 UTC.","examples":"\n**Examples**\n\nMilliseconds since January 1, 1970\n\n```arcade\nDate(1476987783555) // 'Thu Oct 20 2016 11:23:03 GMT-0700 (PDT)'\n```\n\nCreates a Date representing the current time in the time zone of the profile's execution context running Arcade\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nDate()\n```\n\n","completion":{"label":"Date","detail":"Date(epoch?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date with the given Unix epoch number. By default, the Date will display in the time zone of the profile's execution context. If no epoch is provided, creates a Date at the current date and time in the default time zone of the profile. If a `null` value is provided for the epoch, it will be implicitly cast to `0` and will return the date for January 1, 1970 UTC.\n\n**Parameter**\n\n- **epoch** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since January 1, 1970 UTC.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date3","description":"Creates a Date value from an ISO 8601 text value. If a UTC offset is provided, the date will still be displayed in the time zone of the profile. If no text value is provided, creates a date at the current date and time in the time zone of the profile.","examples":"\n**Examples**\n\nCreates a Date from an ISO 8601 text value with a known time offset\n\n```arcade\nDate('2016-10-20T17:41:37+00:00') // 'Thu Oct 20 2016 10:41:37 GMT-0700 (PDT)'\n```\n\nCreates a Date from an ISO 8601 text value with an unknown time offset\n\n```arcade\nDate('2016-10-20T17:41:37') // 'Thu Oct 20 2016 5:41:37 PM PDT'\n```\n\n","completion":{"label":"Date","detail":"Date(timestamp?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value from an ISO 8601 text value. If a UTC offset is provided, the date will still be displayed in the time zone of the profile. If no text value is provided, creates a date at the current date and time in the time zone of the profile.\n\n**Parameter**\n\n- **timestamp** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ISO 8601 text value to be converted into a Date.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date4","description":"Creates a Date from a DateOnly value, with an optional Time and time zone value.","examples":"\n**Example**\n\nCreates a Date from a DateOnly and time type\n\n```arcade\nDate(DateOnly(2022,10,11), Time(\"11:20 am\"))\n// returns a Date representing Nov 11, 2022, 11:20:00 AM in an unknown time zone\n```\n\n","completion":{"label":"Date","detail":"Date(dateOnlyValue, timeValue?, timeZone?) -> Date","insertText":"Date(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date from a DateOnly value, with an optional Time and time zone value.\n\n**Parameters**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value from which to create a Date value.\n- **timeValue** (_Optional_): [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value for the Date. If not specified, the Date will be created with a time of `00:00:00`.\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The time zone of the Date. If not specified, the Date will be created in the `unknown` time zone. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date5","description":"Creates a copy of the given Date.","examples":"\n**Example**\n\nCreates a copy of the current Date value\n\n```arcade\nvar copiedDate = Date(Now())\n```\n\n","completion":{"label":"Date","detail":"Date(dateValue) -> Date","insertText":"Date(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date to copy.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd1","description":"Adds a specified amount of time in the given units to a Date and returns a new Date. If the Date has an IANA time zone, then daylight saving and other time zone driven logic will apply.","examples":"\n**Example**\n\nAdds 7 days to the given Date\n\n```arcade\nvar startDate = Date(2023, 9, 1, 12, 00);\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns a Date representing Oct 8, 2023, 12:00:00 PM PDT\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateValue, addValue, units?) -> Date","insertText":"DateAdd(${1:dateValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a Date and returns a new Date. If the Date has an IANA time zone, then daylight saving and other time zone driven logic will apply.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The input Date to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the Date in the given units.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the Date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd2","description":"Adds a specified amount of time in the given units to a DateOnly value and returns a new DateOnly value.","examples":"\n**Examples**\n\nAdds 7 days to the Date in the provided field\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns 2023-06-11\n```\n\nAdds 12 hours to the Date in the provided field\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar hoursLater = DateAdd(startDate, 12, 'hours');\nreturn hoursLater;\n// returns the original start date, 2023-06-04\n// since 12 hours < 1 day, the DateOnly input is not changed\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateOnlyValue, addValue, units?) -> DateOnly","insertText":"DateAdd(${1:dateOnlyValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a DateOnly value and returns a new DateOnly value.\n\n**Parameters**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The input DateOnly value to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the date in the given units. For DateOnly inputs, this value will be rounded down to the nearest day based on a 24-hour interval. If the value to be added is less than 24 hours, then no value will be added to the DateOnly input.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd3","description":"Adds a specified amount of time in the given units to a Time value and returns a new Time value.","examples":"\n**Examples**\n\nAdds 7 hours to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 7, 'hours');\nreturn hoursLater;\n// returns 18:30:00\n```\n\nAdds 90 seconds to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar secondsLater = DateAdd(startTime, 90, \"seconds\");\nreturn secondsLater;\n// returns 11:31:30\n```\n\nAdds 25 hours to the given Time\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 25, 'hours');\nreturn hoursLater;\n// returns 12:30:00\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(timeValue, addValue, units?) -> Time","insertText":"DateAdd(${1:timeValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAdds a specified amount of time in the given units to a Time value and returns a new Time value.\n\n**Parameters**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The input Time value to which to add time.\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to add to the time in the given units.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units of the number to add to the date. Default is `milliseconds`. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff1","description":"Subtracts two Dates, and returns the difference in the specified units.","examples":"\n**Examples**\n\nSubtracts two Dates and returns the age\n\n```arcade\nvar startDate = Date($feature.startDateField);\nvar endDate = Date($feature.endDateField);\nvar age = DateDiff(endDate, startDate, 'years');\nreturn age;\n```\n\nSubtracts two Dates and returns the difference.\n\n```arcade\nvar startDate = Date(2022,2,23,2,23,22,0, \"America/New_York\"); // Mar 23, 2022, 2:23:22 AM EDT\nvar endDate = Date(2022,2,23,5,23,22,0, \"unknown\"); // Mar 23, 2022, 5:23:22 AM\n\nDateDiff(endDate, startDate, 'hours')\n// returns 3, since the Date with an unknown time zone is assumed to be New York time before the difference is calculated\n\nDateDiff(endDate, startDate, 'hours', \"America/Los_Angeles\");\n// returns 6, since the Date with an unknown time zone is now considered to be Los Angeles time before the difference is calculated\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(date1, date2, units?, timeZone?) -> Number","insertText":"DateDiff(${1:date1_}, ${2:date2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two Dates, and returns the difference in the specified units.\n\n**Parameters**\n\n- **date1**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date value from which to subtract a second Date.\n- **date2**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The Date value to subtract from the first given Date.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given Dates. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. The default value is `milliseconds`.\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since version 1.24_ The time zone to assign to input Dates with an unknown time zone. If not specified, then the following will happen: (1) If one input has a defined time zone and the other is unknown, then the value with the unknown time zone will assume a time zone that matches the other input. (2) If both inputs are unknown time zones, then the DateDiff will be calculated on both Dates as if they were defined in the same time zone. Possible values:\n\n - text representing an entry in the IANA time zone database (e.g. `America/New_York`)\n\n - text representing the hours and minutes that should be added to UTC (e.g. `+07:00` or `-03:00`)\n\n - `system` - time zone will be set to the device or system's local time zone\n\n - `default` - the time zone of the profile's execution context\n\n - `UTC` - Coordinated Universal Time\n\n - `unknown` - removes time zone information for the given value and displays the date and time as defined in the expression.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff2","description":"Subtracts two DateOnly values, and returns the difference in the specified units.","examples":"\n**Example**\n\nSubtracts two DateOnly values and returns the difference in years\n\n```arcade\nvar startDate = DateOnly(1996,11,10);\nvar endDate = DateOnly(); // today's date\nvar age = DateDiff(endDate, startDate, 'years');\nFloor(age); // round down\n// returns 26\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(dateOnly1, dateOnly2, units?) -> Number","insertText":"DateDiff(${1:dateOnly1_}, ${2:dateOnly2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two DateOnly values, and returns the difference in the specified units.\n\n**Parameters**\n\n- **dateOnly1**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value from which to subtract a second DateOnly value.\n- **dateOnly2**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value to subtract from the first given DateOnly value.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given DateOnly values. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `months`, `years`. The default value is `milliseconds`.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff3","description":"Subtracts two Time values, and returns the difference in the specified units.","examples":"\n**Example**\n\nSubtracts two Time values and returns the difference in hours\n\n```arcade\nDateDiff(Time(23,0), Time(9,0), 'hours')\n// returns 14\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(time1, time2, units?) -> Number","insertText":"DateDiff(${1:time1_}, ${2:time2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSubtracts two Time values, and returns the difference in the specified units.\n\n**Parameters**\n\n- **time1**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value from which to subtract a second Time value.\n- **time2**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value to subtract from the first given Time value.\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The units in which to return the difference of the two given Time values. The supported unit types include `milliseconds`, `seconds`, `minutes`, `hours`. The default value is `milliseconds`.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly1","description":"Creates a DateOnly value based on the current date in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current DateOnly (no time)\n\n```arcade\nDateOnly()\n// returns the current date, i.e. 2023-09-12\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly() -> DateOnly","insertText":"DateOnly($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value based on the current date in the time zone of the profile's execution context.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly2","description":"Creates a DateOnly value from inputs representing the year, month, and day.","examples":"\n**Example**\n\nCreates a DateOnly value from inputs representing the year, month, and day\n\n```arcade\nDateOnly(1996, 11, 10)\n// returns 1996-12-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(year, month, day) -> DateOnly","insertText":"DateOnly(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from inputs representing the year, month, and day.\n\n**Parameters**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing a year.\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The month (0-11) where `0` is January and `11` is December. If this value falls outside the normal range (0-11), the function will return `null`.\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The day of the month (1-31). If this value falls outside the normal range (1-31), the function will return `null`.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly3","description":"Creates a DateOnly date with the given Unix epoch number.","examples":"\n**Example**\n\nReturns the DateOnly from the number of milliseconds since January 1, 1970\n\n```arcade\nDateOnly(1476987783555);\n// returns 2016-10-20\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(epoch) -> DateOnly","insertText":"DateOnly(${1:epoch_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly date with the given Unix epoch number.\n\n**Parameter**\n\n- **epoch**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since January 1, 1970 UTC.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly4","description":"Creates a DateOnly value from a text input representing an ISO formatted date, or another formatted text pattern.","examples":"\n**Examples**\n\nCreates a DateOnly value from a text value representing the date\n\n```arcade\nDateOnly(\"2023-05-11T13:43:18.990+01:00\");\n// returns 2023-05-11\n```\n\nCreates a DateOnly value from a text value representing the date in the given format\n\n```arcade\nDateOnly(\"10 Jan 2022\",\"D MMM Y\")\n// returns 2022-01-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(textValue, format?) -> DateOnly","insertText":"DateOnly(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from a text input representing an ISO formatted date, or another formatted text pattern.\n\n**Parameters**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value representing a date. This should either be an ISO formatted date or another formatted text representing a date. If this value does not follow ISO format, the `format` parameter must be defined indicating the date's format.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value indicating the format of the `dateValue` input. \nPossible values: \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly5","description":"Creates a DateOnly value from a given date.","examples":"\n**Example**\n\nReturns the DateOnly from the given date\n\n```arcade\nDateOnly(Date(2008,10,11,10,30));\n// returns 2008-11-11\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateValue) -> DateOnly","insertText":"DateOnly(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a DateOnly value from a given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The date from which to create the DateOnly value.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly6","description":"Creates a copy of a DateOnly value.","examples":"\n**Example**\n\nCreates a copy of DateOnly value\n\n```arcade\nvar originalDateOnly = DateOnly(1996,11,10)\nvar copiedDateOnly = DateOnly(originalDateOnly)\nreturn copiedDateOnly;\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateOnlyValue) -> DateOnly","insertText":"DateOnly(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a DateOnly value.\n\n**Parameter**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - The DateOnly value to copy.\n\n**Return value**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"day","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#day","description":"Returns the day of the month of the given date.","examples":"\n**Examples**\n\nGets the day of the month of the current date\n\n```arcade\nDay(Now())\n```\n\nReturns the day of the month from a DateOnly value\n\n```arcade\nDay(DateOnly(1996, 11, 10))\n// returns 10\n```\n\n","completion":{"label":"Day","detail":"Day(dateValue) -> Number","insertText":"Day(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the month of the given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the day of the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hour","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#hour1","description":"Returns the hour of the time in the given Date or Time value (0-23).","examples":"\n**Examples**\n\nReturns the hour of the current time\n\n```arcade\nHour(Now())\n```\n\nReturns the hour of the time\n\n```arcade\nHour(Date(2023, 1, 1, 12, 59, 23))\n// returns 12\n```\n\nReturns the hour of the time\n\n```arcade\nHour(Time(2, 59, 23))\n// returns 2\n```\n\n","completion":{"label":"Hour","detail":"Hour(dateTimeValue) -> Number","insertText":"Hour(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the hour of the time in the given Date or Time value (0-23).\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the hour of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"isomonth","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth","description":"Returns the month of the given date, based on the ISO 8601 standard. Values range from 1-12 where January is `1` and December is `12`.","examples":"\n**Examples**\n\nGets the month of the given date, based on the ISO 8601 standard. Returns `12`, for the month of December.\n\n```arcade\nISOMonth(Date(1980, 11, 31))\n```\n\nGets the month of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOMonth(DateOnly(1996, 0, 10))\n// returns 1, for January\n```\n\n","completion":{"label":"ISOMonth","detail":"ISOMonth(dateValue) -> Number","insertText":"ISOMonth(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the month of the given date, based on the ISO 8601 standard. Values range from 1-12 where January is `1` and December is `12`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweek","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweek","description":"Returns the week in the year of the given date, based on the ISO 8601 week date calendar. Values range from 1-53 where the first week of the year is `1` and the last week of the year is `52` or `53`, depending on the year.","examples":"\n**Examples**\n\nGets the week of the given date, based on the ISO 8601 standard. Returns `1`, since this date is included in the first week of the following year.\n\n```arcade\nISOWeek(Date(1980, 11, 31))\n```\n\nGets the week of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOWeek(DateOnly(1996, 11, 10))\n// returns 50\n```\n\n","completion":{"label":"ISOWeek","detail":"ISOWeek(dateValue) -> Number","insertText":"ISOWeek(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the week in the year of the given date, based on the ISO 8601 week date calendar. Values range from 1-53 where the first week of the year is `1` and the last week of the year is `52` or `53`, depending on the year.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweekday","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweekday","description":"Returns the day of the week of the given date, based on the ISO 8601 standard. Values range from 1-7 where Monday is `1` and Sunday is `7`.","examples":"\n**Examples**\n\nReturns the day of the week of the given date, based on the ISO 8601 standard. Returns `3`, for Wednesday.\n\n```arcade\nISOWeekday(Date(1980, 11, 31))\n```\n\nReturns the day of the week of the given DateOnly value, based on the ISO 8601 standard.\n\n```arcade\nISOWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"ISOWeekday","detail":"ISOWeekday(dateValue) -> Number","insertText":"ISOWeekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the week of the given date, based on the ISO 8601 standard. Values range from 1-7 where Monday is `1` and Sunday is `7`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to return the day of the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoyear","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoyear","description":"Returns the year of the given date based on the ISO 8601 week date calendar.","examples":"\n**Examples**\n\nGets the year of the given date, based on the ISO 8601 week date calendar. Returns `1981`, since this date is included in the first week of the following year.\n\n```arcade\nISOYear(Date(1980, 11, 31))\n```\n\nGets the year of the given DateOnly value, based on the ISO 8601 week date calendar.\n\n```arcade\nISOYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"ISOYear","detail":"ISOYear(dateValue) -> Number","insertText":"ISOYear(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the year of the given date based on the ISO 8601 week date calendar.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the year. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"millisecond","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#millisecond1","description":"Returns the millisecond of the time in the given Time or Date value.","examples":"\n**Examples**\n\nReturns the millisecond of the current time\n\n```arcade\nMillisecond(Now())\n```\n\nReturns the millisecond of the time\n\n```arcade\nMillisecond(Date(2023, 1, 1, 12, 59, 23, 999))\n// returns 999\n```\n\nReturns the millisecond of the time\n\n```arcade\nMillisecond(Time(2, 59, 23, 450))\n// returns 450\n```\n\n","completion":{"label":"Millisecond","detail":"Millisecond(dateTimeValue) -> Number","insertText":"Millisecond(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the millisecond of the time in the given Time or Date value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the millisecond of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"minute","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#minute1","description":"Returns the minute of the time in the given Time or Date value.","examples":"\n**Examples**\n\nReturns the minute of the current time\n\n```arcade\nMinute(Now())\n```\n\nReturns the minute of the time\n\n```arcade\nMinute(Date(2013, 1, 1, 2, 15, 23))\n// returns 15\n```\n\nReturns the minute of the time\n\n```arcade\nMinute(Time(2, 59, 23))\n// returns 59\n```\n\n","completion":{"label":"Minute","detail":"Minute(dateTimeValue) -> Number","insertText":"Minute(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the minute of the time in the given Time or Date value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the minute of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"month","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#month","description":"Returns the month of the given date. Values range from 0-11 where January is `0` and December is `11`.","examples":"\n**Examples**\n\nGets the month of the given Date. Value can be between 0-11, where `0` represents January and `11` represents December.\n\n```arcade\nMonth(Date(1980, 11, 31))\n// returns 11\n```\n\nGets the month of the given DateOnly value.\n\n```arcade\nMonth(DateOnly(1996, 0, 31))\n// returns 0, for the month of January\n```\n\n","completion":{"label":"Month","detail":"Month(dateValue) -> Number","insertText":"Month(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the month of the given date. Values range from 0-11 where January is `0` and December is `11`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date value from which to get the month. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [ISOMonth()](https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"now","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#now","description":"Creates a Date value representing the current date and time in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current date and time in the profile's default time zone\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n```\n\n","completion":{"label":"Now","detail":"Now() -> Date","insertText":"Now($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value representing the current date and time in the time zone of the profile's execution context.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},[{"type":"function","name":"second","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#second1","description":"Returns the second of the time in the given Date or Time value.","examples":"\n**Examples**\n\nGets the second of the current time\n\n```arcade\nSecond(Now())\n```\n\nGets the second of the time\n\n```arcade\nSecond(Date(2023, 1, 1, 2, 59, 01))\n// returns 1\n```\n\nGets the second of the time\n\n```arcade\nSecond(Time(2, 59, 23))\n// returns 23\n```\n\n","completion":{"label":"Second","detail":"Second(dateTimeValue) -> Number","insertText":"Second(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the second of the time in the given Date or Time value.\n\n**Parameter**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - A Date or Time value from which to get the second of the time. Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time1","description":"Creates a Time value representing the current time in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current time displayed using the profile's default time zone\n\n```arcade\n// Time represents 12:41:20 PM\nTime()\n```\n\n","completion":{"label":"Time","detail":"Time() -> Time","insertText":"Time($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value representing the current time in the time zone of the profile's execution context.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time2","description":"Creates a Time value from inputs representing hours, minutes, seconds, and milliseconds.","examples":"\n**Example**\n\nCreates a Time value from inputs representing hours, minutes, seconds, and milliseconds\n\n```arcade\nTime(13, 20);\n// returns a Time value of 13:20:00\n \nTime(2, 59, 23)\n// returns a Time value of 02:59:23\n \nTime(15, 47, 0, 474)\n// returns a Time value of 15:47:00.474\n```\n\n","completion":{"label":"Time","detail":"Time(hours, minutes, seconds?, milliseconds?) -> Time","insertText":"Time(${1:hours_}, ${2:minutes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from inputs representing hours, minutes, seconds, and milliseconds.\n\n**Parameters**\n\n- **hours**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing hours of the Time value (0-23). If this value falls outside the normal range (0-23), the function will return `null`.\n- **minutes**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the minutes of the Time value (0-59). If this value falls outside the normal range (0-59), the function will return `null`.\n- **seconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the seconds of the Time value (0-59). If this value falls outside the normal range (0-59), the function will return `null`.\n- **milliseconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the milliseconds of the Time value (0-999). If this value falls outside the normal range (0-999), the function will return `null`.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time3","description":"Creates a Time value from a given number representing milliseconds since midnight.","examples":"\n**Examples**\n\nReturns the Time from the number of milliseconds since midnight\n\n```arcade\nTime(8119800);\n// returns a Time value of 02:15:19.800\n```\n\nReturns the Time from the number of milliseconds since midnight\n\n```arcade\nTime(86400001);\n// returns null - the input value exceeds the number of milliseconds in a day\n```\n\n","completion":{"label":"Time","detail":"Time(numValue) -> Time","insertText":"Time(${1:numValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a given number representing milliseconds since midnight.\n\n**Parameter**\n\n- **numValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of milliseconds since midnight. If this value is larger than 86,400,000 (the maximum number of milliseconds in a day) or less than 0, the function will return `null`.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time4","description":"Creates a Time value from a text input representing time, with an optional input indicating the text's format.","examples":"\n**Examples**\n\nCreates a Time value from a text value representing the time\n\n```arcade\nTime(\"1:20 PM\");\n// returns a Time value of 13:20:00\n```\n\nCreates a Time value from a text value representing the time and formatting\n\n```arcade\nTime(\"12 05 04\", \"HH MM ss\")\n// returns a Time value of 12:05:04\n```\n\n","completion":{"label":"Time","detail":"Time(textValue, format?) -> Time","insertText":"Time(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a text input representing time, with an optional input indicating the text's format.\n\n**Parameters**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value representing a time.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value indicating the format of the `timeValue` input. \nPossible values: \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `A`: AM/PM \n\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time5","description":"Creates a Time value from a given date.","examples":"\n**Example**\n\nReturns the Time from the given date\n\n```arcade\nTime(Date(2008,10,11,10,30));\n// returns a Time value of 10:30:00 AM\n```\n\n","completion":{"label":"Time","detail":"Time(dateValue) -> Time","insertText":"Time(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Time value from a given date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - The date from which to get the time.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time6","description":"Creates a copy of a Time value.","examples":"\n**Example**\n\nCreates a copy of Time value\n\n```arcade\nvar originalTime = Time(23,32,00)\nvar copiedTime = Time(originalTime)\nreturn copiedTime;\n```\n\n","completion":{"label":"Time","detail":"Time(timeValue) -> Time","insertText":"Time(${1:timeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a Time value.\n\n**Parameter**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The Time value to copy.\n\n**Return value**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"timestamp","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp","description":"Creates a Date value representing the current date and time in UTC.","examples":"\n**Example**\n\nCreates a Date in UTC time\n\n```arcade\n// Date that represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n```\n\n","completion":{"label":"Timestamp","detail":"Timestamp() -> Date","insertText":"Timestamp($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a Date value representing the current date and time in UTC.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"timezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezone","description":"Returns the time zone of the given Date. The time zone will be one of the following:\n\n- text representing an entry in the IANA time zone database (i.e. `America/New_York`)\n\n- text representing the hours and minutes that should be added to UTC (i.e. `+07:00` or `-03:00`)\n\n- `system` - time zone will be based on the client or system's local time zone\n\n- `UTC` - Coordinated Universal Time\n\n- `Unknown` - time zone information is not defined.","examples":"\n**Example**\n\nReturns the time zone of a Date\n\n```arcade\nvar natlPizzaDay = Date(2024, 1, 9, 0, 0, 0, 0, \"America/Los_Angeles\");\nTimeZone(natlPizzaDay);\n// Returns 'America/Los_Angeles'\n```\n\n","completion":{"label":"TimeZone","detail":"TimeZone(dateValue) -> Text","insertText":"TimeZone(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time zone of the given Date. The time zone will be one of the following:\n\n- text representing an entry in the IANA time zone database (i.e. `America/New_York`)\n\n- text representing the hours and minutes that should be added to UTC (i.e. `+07:00` or `-03:00`)\n\n- `system` - time zone will be based on the client or system's local time zone\n\n- `UTC` - Coordinated Universal Time\n\n- `Unknown` - time zone information is not defined.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value from which to get the time zone.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"timezoneoffset","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezoneoffset","description":"Returns the time zone offset in milliseconds from UTC for the given Date.","examples":"\n**Example**\n\nReturns the time zone offset in milliseconds from UTC\n\n```arcade\nvar inputDate = Date(2011, 10, 11, 8, 0, 0, 0, \"America/New_York\")\nTimeZoneOffset(inputDate);\n// returns -18000000\n```\n\n","completion":{"label":"TimeZoneOffset","detail":"TimeZoneOffset(dateValue) -> Number","insertText":"TimeZoneOffset(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time zone offset in milliseconds from UTC for the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value from which to get the time zone offset.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"today","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#today","description":"Returns the current Date at midnight in the time zone of the profile's execution context.","examples":"\n**Example**\n\nReturns the current Date at midnight, e.g. Mon Oct 24 2016 00:00:00 GMT-0700 (PDT)\n\n```arcade\nToday()\n```\n\n","completion":{"label":"Today","detail":"Today() -> Date","insertText":"Today($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current Date at midnight in the time zone of the profile's execution context.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [DateOnly()](https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"tolocal","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal","description":"Creates a new Date value matching the epoch of the input date and sets the time zone to the local or system time zone of the client.","examples":"\n**Example**\n\nCreates a date in local time at the same epoch as the input date\n\n```arcade\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nToLocal(Timestamp())\n```\n\n","completion":{"label":"ToLocal","detail":"ToLocal(inputDate) -> Date","insertText":"ToLocal(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new Date value matching the epoch of the input date and sets the time zone to the local or system time zone of the client.\n\n**Parameter**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value to represent in the local time of the client.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"toutc","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc","description":"Creates a new Date value matching the epoch of the input date and sets the time zone to UTC (Coordinated Universal Time).","examples":"\n**Example**\n\nCreates a Date in UTC time at the same epoch as the input date.\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nToUTC(Now())\n```\n\n","completion":{"label":"ToUTC","detail":"ToUTC(inputDate) -> Date","insertText":"ToUTC(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new Date value matching the epoch of the input date and sets the time zone to UTC (Coordinated Universal Time).\n\n**Parameter**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - A Date value to represent in UTC time.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**Additional resources**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"week","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#week","description":"Returns the week number in the year of the given Date. Values range from 0-53 where the first week of the year is `0` and the last week of the year is `51`, `52`, or `53`, depending on the year. The first and last weeks may not be a full seven days in length.","examples":"\n**Examples**\n\nUse the default start of the week (Sunday)\n\n```arcade\nWeek( Date(1974,0,3) )\n// Returns 0\n```\n\nSet start of week to Thursday\n\n```arcade\nWeek( Date(1974,0,3), 4 )\n// Returns 1\n```\n\nSet start of week to Friday\n\n```arcade\nWeek( Date(1974,0,3), 5 )\n// Returns 0\n```\n\n```arcade\nWeek( Date(1945,8,23) )\n// Returns 38\n```\n\n```arcade\nWeek( Date(2022,7,20) )\n// Returns 33\n```\n\nReturns the week from the DateOnly value\n\n```arcade\nWeek(DateOnly(1996, 11, 10))\n// returns 49\n```\n\n","completion":{"label":"Week","detail":"Week(dateValue, startDay?) -> Number","insertText":"Week(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the week number in the year of the given Date. Values range from 0-53 where the first week of the year is `0` and the last week of the year is `51`, `52`, or `53`, depending on the year. The first and last weeks may not be a full seven days in length.\n\n**Parameters**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to get the week. DateOnly values are supported starting at version 1.24.\n- **startDay** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the start day of the week. Sunday = 0; Monday = 1; Tuesday = 2; Wednesday = 3; Thursday = 4; Friday = 5; Saturday = 6. The default is `0` (Sunday).\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"weekday","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#weekday","description":"Returns the day of the week of the given Date. Values range from 0-6 where Sunday is `0` and Saturday is `6`.","examples":"\n**Examples**\n\nReturns the day of the week of the given date. Returns `3`, for Wednesday.\n\n```arcade\nWeekday(Date(1980, 11, 31))\n```\n\nReturns the day of the week of the given DateOnly value.\n\n```arcade\nWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"Weekday","detail":"Weekday(dateValue) -> Number","insertText":"Weekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the day of the week of the given Date. Values range from 0-6 where Sunday is `0` and Saturday is `6`.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to return the day of the week. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"year","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#year","description":"Returns the year of the given Date.","examples":"\n**Examples**\n\nGets the year of the current Date\n\n```arcade\nYear(Now())\n```\n\nGets the year of the given DateOnly value\n\n```arcade\nYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"Year","detail":"Year(dateValue) -> Number","insertText":"Year(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the year of the given Date.\n\n**Parameter**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - A Date or DateOnly value from which to get the year. DateOnly values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"debugging_functions","title":"Debugging functions","items":[{"type":"function","name":"console","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#console","description":"Logs a message to a console for debugging purposes. This function can be especially useful for debugging expressions. Unlike most functions, `Console()` does not return a value; rather, it logs messages in a separate window for data inspection purposes only. The successful use of this function has no computational impact on the evaluation of the expression. The location of the console depends on the profile or context where the expression is authored. If authoring an expression in ArcGIS Online, logged messages are accessed in the \"Console\" tab of the results window in the Arcade Editor. Expressions executed in web clients will log console messages to the browser console.","examples":"\n**Example**\n\nLogs the value of `max` for each iteration of the loop within the function\n\n```arcade\n// The console window will log the following:\n// 'current item is: 10, but max = 10'\n// 'current item is: 0, but max = 10'\n// 'current item is: 84, but max = 84'\n// 'current item is: 30, but max = 84'\n\n// The expression evaluates to 84\nfunction findMax(yourArray) {\n var maxValue = -Infinity;\n for (var i in yourArray) {\n maxValue = IIf(yourArray[i] > maxValue, yourArray[i], maxValue);\n Console('current item is: ' + i + ', but maxValue = ' + maxValue);\n }\n return maxValue;\n}\nvar myArray = [ 10, 0, 84, 30 ];\nfindMax(myArray);\n```\n\n","completion":{"label":"Console","detail":"Console([value1, ..., valueN]?) -> Null","insertText":"Console($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nLogs a message to a console for debugging purposes. This function can be especially useful for debugging expressions. Unlike most functions, `Console()` does not return a value; rather, it logs messages in a separate window for data inspection purposes only. The successful use of this function has no computational impact on the evaluation of the expression. The location of the console depends on the profile or context where the expression is authored. If authoring an expression in ArcGIS Online, logged messages are accessed in the \"Console\" tab of the results window in the Arcade Editor. Expressions executed in web clients will log console messages to the browser console.\n\n**Parameter**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A list of variables, text, number, or dictionary to output in the messages window.\n\n**Return value**: Null"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"getenvironment","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#getenvironment","description":"Provides information about the context and environment where the Arcade expression is executed.","examples":"\n**Example**\n\nGets the environment of the client or system\n\n```arcade\nvar env = GetEnvironment()\n// equals the following when executed in a JavaScript Maps SDK application\n// {\n// \"version\":\"1.30\",\n// \"engine\":\"web\",\n// \"engineVersion\":\"4.32\",\n// \"application\":\"\",\n// \"locale\":\"en\",\n// \"spatialReference\": { \"wkid\": 102100 }\n// \"timeZone\":\"America/Los_Angeles\",\n// \"userTimeZone\":\"America/Los_Angeles\"\n// \"activePortal\": { \"url\": \"https://www.arcgis.com\" }\n// \"availablePortals\": [ { \"url\": \"https://www.arcgis.com\" } ]\n// }\nvar locale = IIF(HasValue(env, \"locale\"), env.locale, \"\");\n// returns the locale if it exists, otherwise returns an empty text value\nreturn locale;\n```\n\n","completion":{"label":"GetEnvironment","detail":"GetEnvironment() -> Dictionary","insertText":"GetEnvironment($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nProvides information about the context and environment where the Arcade expression is executed.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary containing the properties below. The properties returned may vary based on where you are running the Arcade expression, so it is recommended to use the `HasValue` function to ensure the desired environment property exists.\n\n- **version**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Arcade version. See the Arcade version matrix for more information about versioning.\n- **engine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The engine executing the Arcade expression. Possible values: `web`, `native`, `jvm`\n- **engineVersion**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The version of the engine executing the Arcade expression. See the Arcade version matrix for more information about versioning.\n- **application**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The application in which the Arcade expression is run. It is up to application developers to set this value. Therefore, this property may be empty depending on the app in which the expression executes.\n- **locale**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The locale of the client or system.\n- **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the Arcade context.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The well-known ID of the spatial reference.\n- **timeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.24_ The time zone of the expression's execution context. This is used when constructing and displaying Date values if a time zone is not otherwise specified.\n- **userTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.30_ The time zone of the device or browser executing the Arcade expression.\n- **activePortal**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - _Since 1.36_ The active portal of the expression's execution context.\n- **availablePortals**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Portal](https://developers.arcgis.com/arcade/guide/types/#portal)> - _Since 1.36_ The array of available portals of the expression's execution context.\n\n**Additional resources**\n\n* [Arcade profiles and execution context](https://developers.arcgis.com/arcade/guide/profiles/)\n* [Arcade version matrix](https://developers.arcgis.com/arcade/guide/version-matrix/)\n* [HasValue()](https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue)\n"}},"parametersInfo":{"min":0,"max":0}}]},{"id":"dictionary_functions","title":"Dictionary functions","items":[{"type":"function","name":"count","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#count","description":"Returns the number of entries in a dictionary.","examples":"\n**Example**\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nCount(d);\n// returns 3\n```\n\n","completion":{"label":"Count","detail":"Count(inputDictionary) -> Number","insertText":"Count(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of entries in a dictionary.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue1","description":"Returns a specified default value if a key in a dictionary does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nDefaultValue returns a defined value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is defined, so it is returned\n// returns Jan 24, 2024, 12:00:00 PM system time\n```\n\nDefaultValue returns a default if there is no value at the specified key.\n\n```arcade\nvar data = {\n time: '',\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is empty, so the default is returned\n// returns \"No time logged\"\n```\n\nDefaultValue returns a default if the key does not exist.\n\n```arcade\nvar data = {\n time: ''\n}\n\nDefaultValue(data, \"conditions\", \"n/a\")\n// the conditions key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a key in a dictionary does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the key does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue2","description":"Returns a specified default value if at least one of the keys in a nested dictionary does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nDefaultValue returns a defined value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], \"No time logged\")\n// value of data.weather.precipitation.value is defined, so it is returned\n// returns 0.4\n```\n\nDefaultValue returns a default if there is no value at the specified key.\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], 0)\n// value of data.weather.precipitation.value is null, so the default is returned\n// returns 0\n```\n\nDefaultValue returns a default if the key does not exist.\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"wind\", \"value\"], \"n/a\")\n// the data.weather.wind key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\nCheck null value in an array within a dictionary with key that exists\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"values\", 3], 0)\n// the value data.weather.precipitation.values[3] is null, so the default is returned\n// returns 0\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if at least one of the keys in a nested dictionary does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary1","description":"Returns a new dictionary based on the provided arguments. The arguments are name/value pairs. e.g. dictionary('field1',val,'field2',val2,...).","examples":"\n**Example**\n\nprints 3\n\n```arcade\nvar d = Dictionary('field1', 1, 'field2', 2)\nreturn d.field1 + d.field2\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary([name1, value1, ..., nameN, valueN]?) -> Dictionary","insertText":"Dictionary($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a new dictionary based on the provided arguments. The arguments are name/value pairs. e.g. dictionary('field1',val,'field2',val2,...).\n\n**Parameter**\n\n- **[name1, value1, ..., nameN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Ongoing name/value pairs.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary2","description":"Deserializes JSON text as an Arcade Dictionary.","examples":"\n**Example**\n\nDeserializes JSON as a Dictionary.\n\n```arcade\nvar extraInfo = '{\"id\": 1, \"population\": 200, \"city\": \"Spencer, ID\"}'\nvar spencerIDdata = Dictionary(extraInfo)\nspencerIDdata.population // Returns 200\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(jsonText) -> Dictionary","insertText":"Dictionary(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDeserializes JSON text as an Arcade Dictionary.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON to convert to an Arcade dictionary. This must be serialized as a text value.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary3","description":"Converts a geometry value to a dictionary.","examples":"\n**Example**\n\nUpdate the x attribute of a point geometry.\n\n```arcade\n// convert the $feature's geometry to a dictionary\nif (TypeOf(Geometry($feature)) == \"Point\") {\n var ptDict = Dictionary(Geometry($feature));\n ptDict.x *= 2; // stretch horizontally\n // create a new geometry from the updated dictionary\n return Geometry(ptDict);\n}\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputGeometry) -> Dictionary","insertText":"Dictionary(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a geometry value to a dictionary.\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to convert to an Arcade dictionary. Starting at version 1.25, Polygon or Polyline inputs may contain curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary4","description":"Converts a feature to a dictionary.","examples":"\n**Example**\n\nConvert a feature to a dictionary\n\n```arcade\n// convert $feature to a dictionary\nvar featureDict = Dictionary($feature);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputFeature) -> Dictionary","insertText":"Dictionary(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a feature to a dictionary.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary5","description":"Creates either a shallow or deep copy of a dictionary.","examples":"\n**Examples**\n\nCreate a shallow copy of a Dictionary\n\n```arcade\nvar inputDict = {\n company: {\n name: \"Esri\",\n location: \"Redlands, CA\"\n },\n office: \"M123\"\n};\nvar copiedDict = Dictionary(inputDict);\nreturn inputDict.company == copiedDict.company\n// returns true\n// this is a shallow copy of the Dictionary, so the dictionaries share the same references\n```\n\nCreate a deep copy of a Dictionary\n\n```arcade\nvar deepCopy = Dictionary(inputDict, true);\nreturn inputDict.company == deepCopy.company\n// returns false\n// this is a deep copy of the Dictionary, so the dictionaries do NOT share the same references\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputDictionary, deep?) -> Dictionary","insertText":"Dictionary(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates either a shallow or deep copy of a dictionary.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to copy.\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - If `true`, creates a deep copy of the dictionary will be created, meaning the properties of the output dictionary will not share the same references as the input dictionary. Default value is `false`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary6","description":"Converts a voxel to a dictionary.","examples":"\n**Example**\n\nConvert a voxel to a dictionary\n\n```arcade\n// convert $voxel to a dictionary\nvar voxelDict = Dictionary($voxel);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputVoxel) -> Dictionary","insertText":"Dictionary(${1:inputVoxel_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a voxel to a dictionary.\n\n**Parameter**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary7","description":"Casts a pixel to a dictionary.","examples":"\n**Example**\n\nConvert a pixel to a dictionary\n\n```arcade\nvar pixelDict = Dictionary($pixel);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputPixel) -> Dictionary","insertText":"Dictionary(${1:inputPixel_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCasts a pixel to a dictionary.\n\n**Parameter**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to convert to an Arcade dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"erase","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#erase","description":"Removes a key-value pair from a dictionary.","examples":"\n**Example**\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nErase(d, 'Grafton');\nreturn d;\n// returns {'Port Hope': 16214, 'Cobourg': 18519};\n```\n\n","completion":{"label":"Erase","detail":"Erase(inputDictionary, key) -> Null","insertText":"Erase(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves a key-value pair from a dictionary.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to remove.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"fromjson","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#fromjson","description":"Deserializes JSON text into its equivalent Arcade data types.","examples":"\n**Examples**\n\nConverts text to a boolean\n\n```arcade\nFromJSON(\"true\")\n// Returns true\n```\n\nConverts text to a number\n\n```arcade\nfromJSON(\"731.1\")\n// returns 731.1\n```\n\nConverts text to a dictionary\n\n```arcade\nvar d = fromJSON('{\"kids\": 3, \"adults\": 4 }')\nd.kids + d.adults\n// returns 7\n```\n\nConverts text to an array\n\n```arcade\nfromJSON('[\"one\", 2, \"three\", false]')\n// returns [ \"one\", 2, \"three\", false ]\n```\n\nConverts text to null\n\n```arcade\nfromJSON(\"null\")\n// returns null\n```\n\n","completion":{"label":"FromJSON","detail":"FromJSON(jsonText) -> Dictionary,Array<Any>,Text,Boolean,Number","insertText":"FromJSON(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDeserializes JSON text into its equivalent Arcade data types.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text to deserialize to an Arcade data type.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getkeys","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#getkeys","description":"Returns an array of all keys in the dictionary, sorted alphabetically.","examples":"\n**Example**\n\nReturns an array of keys from the dictionary, in alphabetical order.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nGetKeys(d);\n// returns ['Cobourg', 'Grafton', 'Port Hope']\n```\n\n","completion":{"label":"GetKeys","detail":"GetKeys(inputDictionary) -> Array<Text>","insertText":"GetKeys(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of all keys in the dictionary, sorted alphabetically.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to get keys from.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getvalues","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#getvalues","description":"Returns an array of all values in the dictionary, ordered to match the alphabetical sorting of their keys.","examples":"\n**Example**\n\nreturns `[18519, '<1000', 16214]`\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nreturn GetValues(d);\n```\n\n","completion":{"label":"GetValues","detail":"GetValues(inputDictionary) -> Array<Any>","insertText":"GetValues(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of all values in the dictionary, ordered to match the alphabetical sorting of their keys.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to get values from.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)>"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#haskey","description":"Indicates whether a dictionary has the input key.","examples":"\n**Example**\n\nprints `true`\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nHasKey(d, 'Cobourg');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputDictionary, key) -> Boolean","insertText":"HasKey(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a dictionary has the input key.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The dictionary to check for a key.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue1","description":"Indicates whether a dictionary has a given key and if that key has a value.","examples":"\n**Examples**\n\nDictionary with key that has a value\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nHasValue(d, 'Cobourg');\n// returns true\n```\n\nDictionary with key that does not have a value\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', null);\nHasValue(d, 'Cobourg');\n// returns false\n```\n\nDictionary without the provided key\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000');\nHasValue(d, 'Cobourg');\n// returns false\n```\n\nDictionary without the provided key\n\n```arcade\nif ( HasValue( Schema($feature).fields[0], \"domain\" ) ) {\n // Do something with the value if true\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, key) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a dictionary has a given key and if that key has a value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key or field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue2","description":"Checks whether a property nested several levels deep in a dictionary has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nCheck dictionary with key that has a nested value\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"value\"])){\n // if() evaluates to true, thus executing the return\n return data.weather.precipitation.value;\n}\n```\n\nCheck value in a dictionary with key that does not exist\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 0])){\n // if() evaluates to false (\"values\" does not exist), thus avoiding the block\n return data.weather.precipitation.values;\n}\n```\n\nCheck value in an array within a dictionary with key that does exist\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 6])){\n // if() evaluates to true, thus executing the return\n return data.weather.precipitation.values[6];\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, keys) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether a property nested several levels deep in a dictionary has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - The dictionary or attachment to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"insert","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#insert","description":"Inserts a key-value pair into the dictionary. If the key already exists, its value will be updated.","examples":"\n**Examples**\n\nInserts a new key-value pair into a dictionary.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nInsert(d, 'Colborne', 1474);\nreturn d;\n// returns {'Port Hope': 16214, 'Grafton': '<1000', 'Cobourg': 18519, 'Colborne': 1474}\n```\n\nUpdates the value for an existing key in a dictionary.\n\n```arcade\nvar d = Dictionary('Port Hope', 16214, 'Grafton', '<1000', 'Cobourg', 18519);\nInsert(d, 'Grafton', 1200);\nreturn d;\n// returns {'Port Hope': 16214, 'Grafton': 1200, 'Cobourg': 18519}\n```\n\n","completion":{"label":"Insert","detail":"Insert(inputDictionary, key, value) -> Null","insertText":"Insert(${1:inputDictionary_}, ${2:key_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nInserts a key-value pair into the dictionary. If the key already exists, its value will be updated.\n\n**Parameters**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The input dictionary.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to insert.\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to insert.\n\n**Return value**: Null"}},"parametersInfo":{"min":3,"max":3}}]},{"id":"enterprise_functions","title":"Enterprise functions","items":[{"type":"function","name":"nextsequencevalue","bundle":"database","sinceVersion":"1.4","link":"https://developers.arcgis.com/arcade/function-reference/enterprise_functions/#nextsequencevalue","description":"Returns the next sequence value from the database sequence specified. If `inputSequenceName` does not exist, the expression will error.","examples":"\n**Example**\n\nReturns a number with the next sequence value\n\n```arcade\nNextSequenceValue('PipeIDSeq')\n```\n\n","completion":{"label":"NextSequenceValue","detail":"NextSequenceValue(sequenceName) -> Number","insertText":"NextSequenceValue(${1:sequenceName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.4](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the next sequence value from the database sequence specified. If `inputSequenceName` does not exist, the expression will error.\n\n**Parameter**\n\n- **sequenceName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the sequence. This must already be configured in the database.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"feature_functions","title":"Feature functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#defaultvalue","description":"Returns a specified default value if a field name in a feature does not exist or the value at the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"n/a\" if feature attribute does not exist or is empty\n\n```arcade\nDefaultValue($feature, \"population\", \"n/a\")\n// Returns the population value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputFeature, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputFeature_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a feature does not exist or the value at the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input feature to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value at the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"domain","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domain","description":"Returns the domain assigned to the given field of the provided `feature`. If the `feature` belongs to a class with a subtype, this returns the domain assigned to the subtype.","examples":"\n**Example**\n\nThe domain assigned to the feature's subtype\n\n```arcade\nvar d = Domain($feature, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n// type: \"codedValue\" ,\n// name: \"poleTypes\",\n// dataType: \"number\",\n// codedValues: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Wood\", code: 1 },\n// { name: \"Steel\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(inputFeature, fieldName) -> Dictionary","insertText":"Domain(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the domain assigned to the given field of the provided `feature`. If the `feature` belongs to a class with a subtype, this returns the domain assigned to the subtype.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) assigned the domain.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of domain - either `codedValue` or `range`.\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The domain name.\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The data type of the domain field. It can be one of the following values: `esriFieldTypeSmallInteger`, `esriFieldTypeInteger`, `esriFieldTypeBigInteger`, `esriFieldTypeSingle`, `esriFieldTypeDouble`, `esriFieldTypeString`, `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Only applicable to `codedValue` domains. An array of dictionaries describing the valid values for the field. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`).\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The minimum value of the domain.\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The maximum value of the domain."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domaincode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domaincode","description":"Returns the code of an associated domain description in a feature.","examples":"\n**Example**\n\nprints the domain code for the field referenced.\n\n```arcade\nDomainCode($feature, 'Enabled', 'True')\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(inputFeature, fieldName, value?, subtype?) -> Number,Text","insertText":"DomainCode(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the code of an associated domain description in a feature.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **value** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value to be converted back into a code.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name for the subtype if the feature supports subtyping. If not provided, the current feature's subtype (if it has one), will be used.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"domainname","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domainname","description":"Returns the descriptive name for a domain code in a feature.","examples":"\n**Example**\n\nprints the domain description for the referenced field\n\n```arcade\nDomainName($feature, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(inputFeature, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the descriptive name for a domain code in a feature.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The code associated with the desired descriptive name. If not provided, the field value in the feature will be returned.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name of the subtype if the feature supports subtyping. If not provided, the feature's subtype (if it has one) will be used.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"expects","bundle":"core","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#expects","description":"Requests additional attributes for the given feature. In some profiles, such as Visualization and Labeling, apps only request the data attributes required for rendering each feature or label. Some expressions dynamically reference field names with variables rather than text literals. This makes it hard for rendering and labeling engines to detect fields required for rendering. This function allows you to explicitly indicate required fields as a list. You can also request all or a subset of fields using a wildcard. Because expressions execute on a per feature basis, the wildcard should be used with caution, especially in layers containing many features. Requesting too much data can result in poor app performance.","examples":"\n**Examples**\n\nRequests fields not easily detected by the renderer\n\n```arcade\n// Request multiple years of population data if the\n// fields cannot be easily detected by the renderer or labels\nExpects($feature, 'POP_2020', 'POP_2010')\nvar thisYear = 2020;\nvar lastDecade = thisYear - 10;\nreturn $feature['POP_'+thisYear] - $feature['POP_'+lastDecade]\n```\n\nRequests all data matching a pattern in the field name\n\n```arcade\n// Request all the data beginning with 'POP'. This is\n// necessary because the renderer can't easily detect\n// the required fields based on this expression\nExpects($feature, 'POP*')\n\nvar startYear = 1880;\nvar endYear = 2020;\nvar changes = [];\n\nfor(var y=startYear; y<endYear; y+=10){\n var startPop = $feature['POP_' + y];\n var endPop = $feature['POP_' + (y+10)];\n var change = endPop - startPop;\n Push(changes, change);\n}\nMax(changes);\n```\n\nRequests all data for the feature\n\n```arcade\n// Request all fields because the required fields may\n// be based on unknown information like a relative date\nExpects($feature, '*')\n\nvar casesToday = $feature[ 'CASES_' + Text(d, 'MM_DD_Y') ];\nvar casesYesterday = $feature[ 'CASES_' + Text(DateAdd( Today(), -1, 'days', 'MM_DD_Y') ];\n// Change in cases from yesterday\nreturn casesToday - casesYesterday;\n```\n\n","completion":{"label":"Expects","detail":"Expects(inputFeature, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:inputFeature_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRequests additional attributes for the given feature. In some profiles, such as Visualization and Labeling, apps only request the data attributes required for rendering each feature or label. Some expressions dynamically reference field names with variables rather than text literals. This makes it hard for rendering and labeling engines to detect fields required for rendering. This function allows you to explicitly indicate required fields as a list. You can also request all or a subset of fields using a wildcard. Because expressions execute on a per feature basis, the wildcard should be used with caution, especially in layers containing many features. Requesting too much data can result in poor app performance.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to which the requested fields will be attached.\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A field name to request for the given feature. List only fields required for use in the expression. If necessary, you can request all fields using the wildcard `*` character. However, this should be avoided to prevent loading an unnecessary amount of data that can negatively impact app performance. This value must be a text literal and cannot be a variable.\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ongoing list of field names to request for the given feature. List only fields required for use in the expression. These values must be text literals and cannot be variables.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature1","description":"Creates a new feature.","examples":"\n**Example**\n\n```arcade\nFeature(pointGeometry, 'city_name', 'Spokane', 'population', 210721)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attribute1, value1, [attribute2, value2, ..., attributeN, valueN]?) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attribute1_}, ${3:value1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry of the feature.\n- **attribute1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The first attribute's name.\n- **value1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - The first attribute's value.\n- **[attribute2, value2, ..., attributeN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Ongoing name/value pairs for each attribute in the feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature2","description":"Creates a new feature from a serialized JSON string.","examples":"\n**Example**\n\n```arcade\nvar JSONString = '{\"geometry\":{\"x\":10,\"y\":20,\"spatialReference\":{\"wkid\":102100}},\"attributes\":{\"hello\":10}}'\nvar ftr1 = Feature(JSONString)\n```\n\n","completion":{"label":"Feature","detail":"Feature(jsonText) -> Feature","insertText":"Feature(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a serialized JSON string.\n\n**Parameter**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The serialized JSON representing a feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature3","description":"Creates a new feature from a geometry and dictionary of attributes.","examples":"\n**Example**\n\n```arcade\nvar dict = { hello:10 }\nvar p = point({x:10, y:20, spatialReference:{wkid:102100}})\nvar ftr = Feature(p,dict)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attributes) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attributes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a geometry and dictionary of attributes.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry of the feature.\n- **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary containing the attributes and their values.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature4","description":"Creates a new feature from a dictionary.","examples":"\n**Example**\n\nCreate a new feature from a dictionary\n\n```arcade\nvar featureDict = {\n geometry: Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n attributes: {\n name1: \"value1\",\n name2: \"value2\"\n }\n};\n// create a new feature from a dictionary of geometry and attributes\nvar newFeature = Feature(featureDict);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputDictionary) -> Feature","insertText":"Feature(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new feature from a dictionary.\n\n**Parameter**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary with the feature geometry and attributes.\n\n - **geometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The geometry of the feature. If `geometry` is a Dictionary, then a new Geometry will be constructed using the `Geometry` function. If `geometry` is null or missing from the dictionary, then the Feature will be created with a `null` geometry.\n - **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary containing the attributes and their values.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature5","description":"Creates a copy of a feature.","examples":"\n**Example**\n\nCreates a copy of a feature\n\n```arcade\nvar copiedFeature = Feature($feature);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputFeature) -> Feature","insertText":"Feature(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a copy of a feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to copy\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featureinfilter","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#featureinfilter","description":"Indicates whether the given feature is included in the provided SQL where clause. If the provided feature is included in the where clause, the function returns `true`; otherwise, it returns `false`. This function is useful for testing whether a feature meets a specific condition. If the input feature is `null`, the function returns `false`. If the `whereClause` is `null` or empty, the function returns `true`. If both parameters are `null`, the function returns `false`.","examples":"\n**Example**\n\nReturn true if feature is included in the provided SQL where clause.\n\n```arcade\n// The provided feature has a 'magnitude' field with a value of 5.2\nif(FeatureInFilter($feature, 'magnitude >= 5')) {\n return 'Significant earthquake';\n}\nreturn 'Minor earthquake';\n```\n\n","completion":{"label":"FeatureInFilter","detail":"FeatureInFilter(inputFeature, whereClause) -> Boolean","insertText":"FeatureInFilter(${1:inputFeature_}, ${2:whereClause_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the given feature is included in the provided SQL where clause. If the provided feature is included in the where clause, the function returns `true`; otherwise, it returns `false`. This function is useful for testing whether a feature meets a specific condition. If the input feature is `null`, the function returns `false`. If the `whereClause` is `null` or empty, the function returns `true`. If both parameters are `null`, the function returns `false`.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check.\n- **whereClause**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL where clause used to test the feature's inclusion. An invalid SQL where clause will result in an error. Standardized SQL-92 is accepted.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"gdbversion","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#gdbversion","description":"Returns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.","examples":"\n**Example**\n\nReturns the geodatabase version of the given feature\n\n```arcade\nGdbVersion($feature)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(inputFeature) -> Text","insertText":"GdbVersion(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A Feature from which to return the current geodatabase version of the associated layer.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#haskey","description":"Indicates whether a feature has the input key.","examples":"\n**Example**\n\nReturns `true` if the feature has a field named `temp`\n\n```arcade\nHasKey($feature, 'temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputFeature, key) -> Boolean","insertText":"HasKey(${1:inputFeature_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a feature has the input key.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check for a field name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#hasvalue","description":"Indicates whether a feature has a given field and if that field has a value.","examples":"\n**Example**\n\nReturn false if feature attribute does not exist or is empty\n\n```arcade\nif(HasValue($feature, \"population\")){\n return $feature.population / AreaGeodetic($feature)\n}\n// Returns the population density if population is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputFeature, fieldName) -> Boolean","insertText":"HasValue(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a feature has a given field and if that field has a value.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#schema","description":"Returns the schema description of the provided Feature.","examples":"","completion":{"label":"Schema","detail":"Schema(inputFeature) -> Dictionary","insertText":"Schema(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the schema description of the provided Feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature whose schema to return.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Returns an array of dictionaries describing the fields in the Feature. Each dictionary describes the field `name`, `alias`, `type`, `subtype`, `domain`, `length`, and whether it is `editable` and `nullable`.\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The geometry type of features in the Feature. Returns `esriGeometryNull` for tables with no geometry. \nPossible values: `esriGeometryPoint`, `esriGeometryLine`, `esriGeometryPolygon`, `esriGeometryNull`\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The global ID field of the Feature. Returns `\"\"` if not globalId-enabled.\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The objectId field of the Feature."}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypecode","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypecode","description":"Returns the subtype code for a given feature.","examples":"\n**Example**\n\nReturns the code of the subtype\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeCode($feature) // returns 1\n```\n\n","completion":{"label":"SubtypeCode","detail":"SubtypeCode(inputFeature) -> Number,Text,Date","insertText":"SubtypeCode(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype code for a given feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get the subtype code.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypename","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypename","description":"Returns the subtype name for a given feature.","examples":"\n**Example**\n\nReturns the name of the subtype\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeName($feature) // returns \"Single Phase\"\n```\n\n","completion":{"label":"SubtypeName","detail":"SubtypeName(inputFeature) -> Text","insertText":"SubtypeName(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype name for a given feature.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get the subtype name.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypes","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypes","description":"Returns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.","examples":"\n**Example**\n\nReturns subtypes with coded values from a feature\n\n```arcade\nSubtypes($feature)\n// returns the following dictionary\n// {\n// subtypeField: 'assetGroup',\n// subtypes: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Single Phase\", code: 1 },\n// { name: \"Two Phase\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(inputFeature) -> Dictionary","insertText":"Subtypes(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature from which to get subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field containing a subtype.\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries describing the subtypes. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"timereceived","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#timereceived","description":"Returns the time a feature was received by the client. This is primarily used for calculating the age of a feature when rendering data in a stream layer. Returns `null` if no feature is provided or if the source layer is not a stream layer.","examples":"\n**Example**\n\nReturns the age of the feature (in seconds) since it was received by the client application.\n\n```arcade\nvar received = TimeReceived($feature);\nif(received){\n var age = DateDiff( Now(), received, \"seconds\");\n return age;\n}\n```\n\n","completion":{"label":"TimeReceived","detail":"TimeReceived(inputFeature) -> Date","insertText":"TimeReceived(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the time a feature was received by the client. This is primarily used for calculating the age of a feature when rendering data in a stream layer. Returns `null` if no feature is provided or if the source layer is not a stream layer.\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - An input feature from a stream layer.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"featureset_functions","title":"FeatureSet functions","items":[{"type":"function","name":"area","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area","description":"Returns the area of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the layer in square kilometers\n\n```arcade\nArea($layer, 'square-kilometers')\n```\n\n","completion":{"label":"Area","detail":"Area(features, unit?) -> Number","insertText":"Area(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the area of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic","description":"Returns the geodetic area of the input FeatureSet in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic area of the layer in square kilometers\n\n```arcade\nAreaGeodetic($layer, 'square-kilometers')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(features, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic area of the input FeatureSet in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the geodetic area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic area calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"attachments","bundle":"data-access","sinceVersion":"1.6","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#attachments","description":"Returns a list of attachments associated with the input feature. Each result includes the name of the attachment, the content type, id, and size in bytes. Only applicable to features originating from a feature service.","examples":"\n**Example**\n\nReturns the number of attachments associated with the feature\n\n```arcade\n// Returns the number of attachments associated with the feature\nCount(Attachments($feature))\n```\n\n","completion":{"label":"Attachments","detail":"Attachments(inputFeature, options?) -> Array<Attachment>","insertText":"Attachments(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.6](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a list of attachments associated with the input feature. Each result includes the name of the attachment, the content type, id, and size in bytes. Only applicable to features originating from a feature service.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - Attachments associated with this feature will be fetched from the service.\n- **options** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Settings for the request. Dictionary properties:\n\n - **types**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of text values representing the file types to fetch. \nPossible Values: `bmp`, `ecw`, `emf`, `eps`, `ps`, `gif`, `img`, `jp2`, `jpc`, `j2k`, `jpf`, `jpg`, `jpeg`, `jpe`, `png`, `psd`, `raw`, `sid`, `tif`, `tiff`, `wmf`, `wps`, `avi`, `mpg`, `mpe`, `mpeg`, `mov`, `wmv`, `aif`, `mid`, `rmi`, `mp2`, `mp3`, `mp4`, `pma`, `mpv2`, `qt`, `ra`, `ram`, `wav`, `wma`, `doc`, `docx`, `dot`, `xls`, `xlsx`, `xlt`, `pdf`, `ppt`, `pptx`, `txt`, `zip`, `7z`, `gz`, `gtar`, `tar`, `tgz`, `vrml`, `gml`, `json`, `xml`, `mdb`, `geodatabase`\n - **minsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The minimum file size of the attachment in bytes.\n - **maxsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum file size of the attachment in bytes.\n - **metadata** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include attachment metadata in the function return. Only Exif metadata for images is currently supported.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment)>"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"average","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#average","description":"Returns the average value of a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the difference between the feature's population and the average population of all features in the layer\n\n```arcade\n$feature.population - Average($layer, 'population')\n```\n\ncalculates the average population per square mile of all features in the layer\n\n```arcade\nAverage($layer, 'population / area')\n```\n\n","completion":{"label":"Average","detail":"Average(features, fieldNameOrSQLExpression) -> Number","insertText":"Average(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average value of a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#contains","description":"Returns features from a FeatureSet that are contained within the input geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\nReturns the number of features that are within the given polygon\n\n```arcade\nvar parcels = FeatureSetByName($map, 'parcels')\nvar projectArea = $feature;\nCount(Contains(projectArea, parcels));\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideFeatures) -> FeatureSet","insertText":"Contains(${1:containerGeometry_}, ${2:insideFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that are contained within the input geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'contains' relationship to `insideFeatures`. Think of this geometry as the potential 'container' of the `insideFeatures`.\n- **insideFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the 'within' relationship to the `containerGeometry`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"count","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#count","description":"Returns the number of features in a FeatureSet.","examples":"\n**Example**\n\nReturns the number of features in a layer\n\n```arcade\nCount($layer)\n```\n\n","completion":{"label":"Count","detail":"Count(features) -> Number","insertText":"Count(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of features in a FeatureSet.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to count the number of features\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#crosses","description":"Returns features from a FeatureSet that cross the input geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the FeatureSet that cross the given polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Crosses($layer, geom2) );\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(features, crossingGeometry) -> FeatureSet","insertText":"Crosses(${1:features_}, ${2:crossingGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that cross the input geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features to test the crosses relationship with the input `crossingGeometry`.\n- **crossingGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being crossed.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distinct","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#distinct","description":"Returns a set of distinct, or unique, values from a FeatureSet.","examples":"\n**Examples**\n\nReturns a FeatureSet with a 'Status' column. Each row of the FeatureSet contains a unique status value\n\n```arcade\nDistinct($layer, 'Status')\n```\n\nReturns a FeatureSet with a 'Status' and a 'Type' column. Each row of the FeatureSet contains a unique combination of 'Status' and 'Type' values\n\n```arcade\nDistinct($layer, ['Status', 'Type'])\n```\n\nReturns FeatureSet with a Density column with rows that may contain values of Low, High, or N/A\n\n```arcade\nDistinct($layer, {\n name: \"Density\",\n expression: \"CASE WHEN PopDensity < 100 THEN 'Low' WHEN PopDensity >= 100 THEN 'High' ELSE 'N/A' END\"\n})\n```\n\nReturns FeatureSet with a Score and a Type column\n\n```arcade\nDistinct($layer, [{\n name: 'Score',\n expression: 'POPULATION_DENSITY * 0.65 + Status_Code * 0.35'\n}, {\n name: 'Type',\n expression: 'Category'\n}])\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(features, fields) -> FeatureSet","insertText":"Distinct(${1:features_}, ${2:fields_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a set of distinct, or unique, values from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return distinct values.\n- **fields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The field(s) and/or expression(s) from which to determine unique values. This parameter can be an array of field names, an array of expressions, or a dictionary or array of dictionary that specify output column names where unique values will be stored. If a dictionary is specified, the folowing specification must be used:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given expression.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression from which to calculate a unique value.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domain","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domain","description":"Returns the domain assigned to the given field of the provided `featureSet`. If the `featureSet` belongs to a class with a subtype, this returns the domain assigned to the subtype.","examples":"\n**Example**\n\nThe domain assigned to the feature's subtype\n\n```arcade\nvar fsPole = FeatureSetByName($layer, \"Pole\", 1);\nvar d = Domain(fsPole, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n// type: \"codedValue\" ,\n// name: \"poleTypesThreePhase\",\n// dataType: \"number\",\n// codedValues: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Wood\", code: 1 },\n// { name: \"Steel\", code: 2 }\n// { name: \"Reinforced Steel\", code: 3 }\n// ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(features, fieldName, subtype?) -> Dictionary","insertText":"Domain(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the domain assigned to the given field of the provided `featureSet`. If the `featureSet` belongs to a class with a subtype, this returns the domain assigned to the subtype.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet whose features contain a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **subtype** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The coded value for the subtype if the feature supports subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of domain - either `codedValue` or `range`.\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The domain name.\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The data type of the domain field. It can be one of the following values: `esriFieldTypeSmallInteger`, `esriFieldTypeInteger`, `esriFieldTypeBigInteger`, `esriFieldTypeSingle`, `esriFieldTypeDouble`, `esriFieldTypeString`, `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The minimum value of the domain.\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Only applicable to `range` domains. The maximum value of the domain.\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Only applicable to `codedValue` domains. An array of dictionaries describing the valid values for the field. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)."}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"domaincode","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domaincode","description":"Returns the code of an associated domain description in a FeatureSet.","examples":"\n**Example**\n\nPrints the domain description for the field referenced.\n\n```arcade\nDomainCode($layer, 'Enabled', 'True', subtype)\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(features, fieldName, value, subtype?) -> Number,Text","insertText":"DomainCode(${1:features_}, ${2:fieldName_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the code of an associated domain description in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The feature set with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value to be converted back into a code. The returned code comes from the service metadata.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name for the subtype if the feature set supports subtyping.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"domainname","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domainname","description":"Returns the descriptive name for a domain code in a FeatureSet.","examples":"\n**Example**\n\nprints the domain description for the referenced field\n\n```arcade\nDomainName($layer, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(features, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the descriptive name for a domain code in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet with a field that has a domain.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the field (not the alias of the field) containing the domain.\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The code associated with the desired descriptive name. The returned code comes from the service metadata.\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The coded number or name of the subtype if the FeatureSet supports subtyping.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"envelopeintersects","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#envelopeintersects","description":"Returns features from a FeatureSet where the envelopes (or extent) of a set of features intersect the envelope of another geometry. In the graphic below, the red highlight illustrates the spatial relationships where the function will return features.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that intersect the envelope of geom2\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( EnvelopeIntersects($layer, geom2) );\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(features, envelope) -> FeatureSet","insertText":"EnvelopeIntersects(${1:features_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet where the envelopes (or extent) of a set of features intersect the envelope of another geometry. In the graphic below, the red highlight illustrates the spatial relationships where the function will return features.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the intersects relationship to the input `envelope`.\n- **envelope**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The envelope being intersected.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"expects","bundle":"data-access","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#expects","description":"Requests additional attributes for the given FeatureSet.","examples":"\n**Example**\n\nRequests the POPULATION field for the features in the cluster\n\n```arcade\n// If the layer is clustered based on count,\n// only the OBJECTID field is requested by default.\n// To display the sum of the POPULATION field\n// for all features in the cluster, we must\n// explicitly request the POPULATION data. \nExpects($aggregatedFeatures, 'POPULATION')\nText(Sum($aggregatedFeatures, 'POPULATION'), '#,###')\n```\n\n","completion":{"label":"Expects","detail":"Expects(features, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:features_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRequests additional attributes for the given FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The feature set to which the requested fields will be attached.\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A field name to request for the given feature. List only fields required for use in the expression. If necessary, you can request all fields using the wildcard `*` character. However, this should be avoided to prevent loading an unnecessary amount of data that can negatively impact app performance. This value must be a text literal and cannot be a variable.\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An ongoing list of field names to request for the given feature. List only fields required for use in the expression. These values must be text literals and cannot be variables.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset1","description":"Creates a new FeatureSet from JSON according to the ArcGIS REST spec. See the snippet below for an example of this.","examples":"\n**Example**\n\nCreate a FeatureSet from JSON.\n\n```arcade\n// JSON representation of the feature used in the snippet below\n// {\n// 'fields': [{\n// 'alias': 'RANK',\n// 'name': 'RANK',\n// 'type': 'esriFieldTypeInteger'\n// }, {\n// 'alias': 'ELEV_m',\n// 'name': 'ELEV_m',\n// 'type': 'esriFieldTypeInteger'\n// }],\n// 'spatialReference': { 'wkid': 4326 },\n// 'geometryType': 'esriGeometryPoint',\n// 'features': [{\n// 'geometry': {\n// 'spatialReference': { 'wkid': 4326 },\n// 'x': -151.0063,\n// 'y': 63.069\n// },\n// 'attributes': {\n// 'RANK': 1,\n// 'ELEV_m': 6168\n// }\n// }]\n// };\n// The Dictionary representation of the FeatureSet must be a serialized text value\nvar features = FeatureSet('{\"fields\":[{\"alias\":\"RANK\",\"name\":\"RANK\",\"type\":\"esriFieldTypeInteger\"},{\"alias\":\"ELEV_m\",\"name\":\"ELEV_m\",\"type\":\"esriFieldTypeInteger\"}],\"spatialReference\":{\"wkid\":4326},\"geometryType\":\"esriGeometryPoint\",\"features\":[{\"geometry\":{\"spatialReference\":{\"wkid\":4326},\"x\":-151.0063,\"y\":63.069},\"attributes\":{\"RANK\":1,\"ELEV_m\":6168}}]}')\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet from JSON according to the ArcGIS REST spec. See the snippet below for an example of this.\n\n**Parameter**\n\n- **definition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON describing a set of features. The JSON must be serialized as a text value.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset2","description":"Creates a new FeatureSet from a Dictionary representing JSON according to the ArcGIS REST spec. See the snippet below for an example of this.","examples":"\n**Example**\n\nCreate a FeatureSet from dictionary.\n\n```arcade\n// JSON representation of the feature used in the snippet below\nvar d = {\n fields: [{\n alias: 'RANK',\n name: 'RANK',\n type: 'esriFieldTypeInteger'\n }, {\n alias: 'ELEV_m',\n name: 'ELEV_m',\n type: 'esriFieldTypeInteger'\n }],\n spatialReference: { wkid: 4326 },\n geometryType: 'esriGeometryPoint',\n features: [{\n geometry: {\n spatialReference: { wkid: 4326 },\n x: -151.0063,\n y: 63.069\n },\n attributes: {\n RANK: 1,\n ELEV_m: 6168\n }\n }]\n };\nvar features = FeatureSet(d)\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet from a Dictionary representing JSON according to the ArcGIS REST spec. See the snippet below for an example of this.\n\n**Parameter**\n\n- **definition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A Dictionary describing a set of features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featuresetbyassociation","bundle":"data-access","sinceVersion":"1.9","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyassociation","description":"Returns all the features associated with the input feature as a FeatureSet. This is specific to Utility Network workflows.","examples":"\n**Examples**\n\nReturns all assets that have connectivity associations with the low side terminal of the transformer.\n\n```arcade\nFeatureSetByAssociation($feature, 'connected', 'Low');\n```\n\nReturns the number of electric devices associated with the feature\n\n```arcade\nvar allContent = FeatureSetByAssociation ($feature, \"content\");\nvar devicesRows = Filter(allContent, \"className = 'Electric Device'\");\nvar devicesCount = Count(devicesRows);\nreturn devicesCount;\n```\n\n","completion":{"label":"FeatureSetByAssociation","detail":"FeatureSetByAssociation(inputFeature, associationType, terminalName?) -> FeatureSet","insertText":"FeatureSetByAssociation(${1:inputFeature_}, ${2:associationType_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.9](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns all the features associated with the input feature as a FeatureSet. This is specific to Utility Network workflows.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature from which to query for all associated features. This feature must be coming from a feature service; feature collections are not supported.\n- **associationType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The type of association with the feature to be returned. \n Possible Values: `connected` \\| `container` \\| `content` \\| `structure` \\| `attached` \n Possible Values added at version 1.10: `junctionEdge` \\| `midspan`\n- **terminalName** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Only applicable to `connected` association types.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) \nReturns a FeatureSet containing features with the field specification described in the table below.\n\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The class name based on the value of `TONETWORKSOURCEID` or `FROMNETWORKSOURCEID`.\n- **globalId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Global ID of the feature in the other table (i.e. either the value of `TOGLOBALID` or `FROMGLOBALID`).\n- **isContentVisible**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Can either be a value of `1` (visible) or `0` (not visible). This value represents the visibility of the associated content and is only applicable for containment associations.\n- **objectId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The ObjectID of the row in the association table.\n- **percentAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applies to `midspan` association types. Returns a floating point number from 0-1 indicating the location (as a ratio) of the junction along the edge.\n- **side**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Applies to `junctionEdge` association types. Indicates which side the junction is on.\n\nPossible values: `from` or `to`"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"featuresetbyid","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyid","description":"Creates a FeatureSet from a Feature Layer based on its layer ID within a map or feature service. Limiting the number of fields in the request and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer with the id DemoLayerWM_1117 in the given map.\n\n```arcade\nvar features = FeatureSetById($map,'DemoLayerWM_1117', ['*'], true);\nCount( features );\n```\n\n","completion":{"label":"FeatureSetById","detail":"FeatureSetById(featureSetCollection, id, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetById(${1:featureSetCollection_}, ${2:id_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer based on its layer ID within a map or feature service. Limiting the number of fields in the request and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The ID of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. _Please note that this value must be a text literal._\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. By default, this is `true`. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyname","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyname","description":"Creates a FeatureSet from a Feature Layer based on its name within a map or feature service. Keep in mind this name is not necessarily unique. It is therefore more appropriate to create a FeatureSet using `FeatureSetById()`. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer with the title 'Bike routes' in the given map.\n\n```arcade\nvar features = FeatureSetByName($map,'Bike routes', ['*'], true);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByName","detail":"FeatureSetByName(featureSetCollection, title, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByName(${1:featureSetCollection_}, ${2:title_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer based on its name within a map or feature service. Keep in mind this name is not necessarily unique. It is therefore more appropriate to create a FeatureSet using `FeatureSetById()`. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the `$map` or `$datastore` global.\n- **title**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The title of the layer within the given `map`. This layer must be created from a feature service; feature collections are not supported. _Please note that this value must be a text literal._\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. By default, this is `true`. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipclass","bundle":"data-access","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipclass","description":"Returns the related records for a given feature based on the name of a given relationship class.","examples":"\n**Example**\n\nReturns the count of pole inspection related records\n\n```arcade\n// A calculation rule that returns the count of a pole inspection records.\n// When a pole feature is updated the calculation rule reads all its related inspections records from the comments field and returns the total inspection count for that feature.\nvar fsinspected = FeatureSetByRelationshipClass($feature, “pole_inspection”, [“comments”], false);\nreturn Count(fsinspected);\n```\n\n","completion":{"label":"FeatureSetByRelationshipClass","detail":"FeatureSetByRelationshipClass(inputFeature, relationshipClass, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipClass(${1:inputFeature_}, ${2:relationshipClass_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the related records for a given feature based on the name of a given relationship class.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature from which to fetch related records.\n- **relationshipClass**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the relationship class as defined in the data source.\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to return in the FeatureSet. This list includes fields from both the relationship table and the input Feature.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to return the geometry for the resulting features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Attribute rules and relationship classes](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rules-and-relationship-classes.htm)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipname","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipname","description":"Returns the related records for a given feature as a FeatureSet.","examples":"\n**Example**\n\nReturns the sum of several fields across all related records\n\n```arcade\nvar results = FeatureSetByRelationshipName($feature, 'Election_Results', ['*'], false)\nSum(results, 'democrat + republican + other')\n```\n\n","completion":{"label":"FeatureSetByRelationshipName","detail":"FeatureSetByRelationshipName(inputFeature, relationshipName, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipName(${1:inputFeature_}, ${2:relationshipName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the related records for a given feature as a FeatureSet.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature for which to fetch related records.\n- **relationshipName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the relationship according to the feature service associated with the given feature.\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to return in the FeatureSet. This list includes fields from both the relationship table and the input Feature.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to return the geometry for the resulting features.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"filter","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter","description":"Creates a new FeatureSet with all the features that pass the SQL92 expression filter.","examples":"\n**Examples**\n\nFilter features using a SQL92 expression\n\n```arcade\n// Returns all features with a Population greater than 10,000\nvar result = Filter($layer, 'POPULATION > 10000');\n```\n\nFilter features using a SQL92 expression with a variable substitute\n\n```arcade\n// Returns all features with a Population greater than the dataset average\nvar averageValue = Average($layer, 'POPULATION')\nvar result = Filter($layer, 'POPULATION > @averageValue');\n```\n\n","completion":{"label":"Filter","detail":"Filter(features, sqlExpression) -> FeatureSet","insertText":"Filter(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet with all the features that pass the SQL92 expression filter.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to filter.\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL92 expression used to filter features in the layer. This expression can substitute an Arcade variable using the `@` character. See the snippet below for an example.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filterbysubtypecode","bundle":"data-access","sinceVersion":"1.25","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filterbysubtypecode","description":"Creates a new FeatureSet with all the features matching the given subtype code.","examples":"\n**Example**\n\nFilter features with the subtype code\n\n```arcade\n// Returns all features that have the given subtype code\nFilterBySubtypeCode($layer, 5)\n```\n\n","completion":{"label":"FilterBySubtypeCode","detail":"FilterBySubtypeCode(features, subtypeCode) -> FeatureSet","insertText":"FilterBySubtypeCode(${1:features_}, ${2:subtypeCode_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.25](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a new FeatureSet with all the features matching the given subtype code.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to filter.\n- **subtypeCode**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The subtype code used to filter features in the FeatureSet or layer.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#first","description":"Returns the first feature in a FeatureSet. Returns `null` if the FeatureSet is empty.","examples":"\n**Example**\n\nreturns the area of the first feature in the layer.\n\n```arcade\nArea( First($layer) )\n```\n\n","completion":{"label":"First","detail":"First(features) -> Feature","insertText":"First(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first feature in a FeatureSet. Returns `null` if the FeatureSet is empty.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to return the first feature.\n\n**Return value**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"gdbversion","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#gdbversion","description":"Returns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.","examples":"\n**Example**\n\nReturns the geodatabase version of the given FeatureSet\n\n```arcade\nGdbVersion($layer)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(features) -> Text","insertText":"GdbVersion(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the name of the current geodatabase version for branch or versioned data. When the data is not in a multi-user geodatabase, an empty text value will be returned.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current geodatabase version.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**Additional resources**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getfeatureset","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeatureset","description":"Gets the FeatureSet in which the input feature belongs. The returned FeatureSet represents all features from the input feature's parent/root layer or table.","examples":"\n**Examples**\n\nReturns a FeatureSet representing all the features in the data source.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f)\n// returns a FeatureSet representing the data source, which does not include the map filter (2,000 features)\n```\n\nReturns the root FeatureSet of the feature.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'root')\n// returns the root FeatureSet, which honors the user's filter from the map (a total of 100 features)\n```\n\nReturns the parent FeatureSet of the feature.\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'parent')\n// returns the parent FeatureSet, which is the result of the top function \n// (a total of 10 features)\n```\n\nReturns the number of features in the data source table within 1 mile of the feature.\n\n```arcade\nvar fullFeatureSet = GetFeatureSet($feature);\nvar featuresOneMile = Intersects(fullFeatureSet, BufferGeodetic($feature, 1, 'miles'))\nCount(featuresOneMile)\n```\n\n","completion":{"label":"GetFeatureSet","detail":"GetFeatureSet(inputFeature, source?) -> FeatureSet","insertText":"GetFeatureSet(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGets the FeatureSet in which the input feature belongs. The returned FeatureSet represents all features from the input feature's parent/root layer or table.\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The feature belonging to a parent or root FeatureSet.\n- **source** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Indicates the source FeatureSet to return. \nPossible Values:\n\n - `datasource`: (default) Returns all the features from the input feature's data source without any filters or definition expressions as a FeatureSet. \n - `root`: Returns the initial FeatureSet to which the input feature belongs. This may be a filtered subset of all the features in the data source. \n - `parent`: Returns the parent FeatureSet of the input feature. This can be a smaller set of features than the original data source or root FeatureSet. \n\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getfeaturesetinfo","bundle":"data-access","sinceVersion":"1.18","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeaturesetinfo","description":"Returns metadata for the original source database and service (if applicable) of a FeatureSet.","examples":"\n**Examples**\n\nMetadata returned from a FeatureSet connected to an underlying feature service\n\n```arcade\n// $layer originates from a feature service layer in a web map\nGetFeatureSetInfo($layer);\n\n// returns the following: \n{\n \"layerId\": 7,\n \"layerName\": \"My Table\",\n \"itemId\": \"dda795cf2af44d2bb7af2827963b76e8\",\n \"serviceLayerUrl\": \"https://utilitynetwork.esri.com/server/rest/services/ClassicNapervilleElectric_Postgres/FeatureServer/100\",\n \"webMapLayerId\": 1,\n \"webMapLayerTitle\": \"MyTable1\",\n \"className\": null,\n \"objectClassId\": null\n}\n```\n\nMetadata returned from a FeatureSet originating from a filegdb or mobilegdb\n\n```arcade\n// $featureset originates from a feature class in a filegdb or mobilegdb\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n \"layerId\": null,\n \"layerName\": null,\n \"itemId\": null,\n \"serviceLayerUrl\": null,\n \"webMapLayerId\": null,\n \"webMapLayerTitle\": null,\n \"className\": \"myTable\",\n \"objectClassId\": 7\n}\n```\n\nMetadata returned from a FeatureSet connected to an sde workspace (client server direct connection)\n\n```arcade\n// Client server direct connection (sqlserver/oracle/etc.)\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n \"layerId\": null,\n \"layerName\": null,\n \"itemId\": null,\n \"serviceLayerUrl\": null,\n \"webMapLayerId\": null,\n \"webMapLayerTitle\": null,\n \"className\": \"owner.myTable\",\n \"objectClassId\": 7\n}\n```\n\n","completion":{"label":"GetFeatureSetInfo","detail":"GetFeatureSetInfo(inputFeatureSet) -> Dictionary","insertText":"GetFeatureSetInfo(${1:inputFeatureSet_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.18](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns metadata for the original source database and service (if applicable) of a FeatureSet.\n\n**Parameter**\n\n- **inputFeatureSet**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to fetch metadata.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **layerId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The layerId of the feature service. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **layerName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The layer name of the feature service. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The portal item ID of the feature service. Only applicable to FeatureSets created from feature services that have an associated portal item. This value will be `null` for sde/filegdb/mobile workspaces.\n- **serviceLayerUrl**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The url of the feature service layer. Only applicable to FeatureSets created from feature services. This value will be `null` for sde/filegdb/mobile workspaces.\n- **webMapLayerId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The layerId of the associated layer within the context of a web map. Only applicable to FeatureSets created from feature service layers that are contained within a web map. This value will be `null` for sde/filegdb/mobile workspaces.\n- **webMapLayerTitle**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The title of the associated layer within the context of a web map. Only applicable to FeatureSets created from feature service layers that are contained within a web map. This value will be `null` for sde/filegdb/mobile workspaces.\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the underlying feature class. Only applicable to FeatureSets created from feature classes in filegdb/mobile workspaces.\n- **objectClassId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The objectClassId. Only applicable to FeatureSets created from feature classes in filegdb workspaces."}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser1","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns information about the user \"tester\".\n\n```arcade\nGetUser($layer, \"tester\")\n// returns {\"id\": \"12\", \"username\": \"tester\", \"name\":\"Testy Tester\", \"email\": \"tester@example.com\", ...}\n```\n\nReturns username for the currently logged in user of the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nvar userInfo = GetUser($layer);\nif(HasValue(userInfo, \"username\")){\n return userInfo.username;\n}\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, username?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current user.\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the user you want to return. Only limited information will be returned based on your permissions when making the request.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc)."}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser2","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Example**\n\nReturns information about the user currently logged in based on the workspace connection from a layer with user extensions.\n\n```arcade\nGetUser($layer, true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, extensions?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return the current user.\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Determines if the `userLicenseTypeExtensions` will be returned in the dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the license type extensions associated with the user's account (e.g. \"Utility Network\", \"Parcel Fabric\", etc). The `extensions` parameter must be set to `true` in order for this to be returned."}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"groupby","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#groupby","description":"Returns statistics as a FeatureSet for a set of grouped or distinct values.","examples":"\n**Examples**\n\nReturns the count of each tree type\n\n```arcade\nvar treeStats = GroupBy($layer, 'TreeType', { name: 'NumTrees', expression: '1', statistic: 'COUNT' });\n// treeStats contains features with columns TreeType and NumTrees\n// Each unique tree type will have a count\n```\n\nReturns the count and the average height of each tree type\n\n```arcade\nvar treeStats = GroupBy($layer,\n [ // fields/expressions to group statistics by\n { name: 'Type', expression: 'TreeType'},\n { name: 'Status', expression: 'TreeStatus'}\n ], \n [ // statistics to return for each unique category\n { name: 'Total', expression: '1', statistic: 'COUNT' }, \n { name: 'AvgHeight', expression: 'Height', statistic: 'AVG' }, \n { name: 'MaxPercentCoverage', expression: 'CoverageRatio * 100', statistic: 'MAX' }\n ]\n);\n// treeStats contains features with columns Type, Status, Total, AvgHeight, MaxPercentCoverage\n// Each unique tree type (combination of type and status) will have a count, average height, and maximum value of percent coverage\n```\n\n","completion":{"label":"GroupBy","detail":"GroupBy(features, groupByFields, statistics) -> FeatureSet","insertText":"GroupBy(${1:features_}, ${2:groupByFields_}, ${3:statistics_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns statistics as a FeatureSet for a set of grouped or distinct values.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet from which to return statistics for unique values returned from a given set of fields and/or expressions.\n- **groupByFields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The field(s) and/or expression(s) from which to group statistics by unique values. This parameter can be a single field name, an array of field names, or an array of objects that specify column names paired with an expression (typically the field name) for the output FeatureSet. If an array of objects is specified, the following specification must be followed for each object:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given expression.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression from which to group statistics. This is typically a field name.\n- **statistics**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - The summary statistics to calculate for each group. This parameter can be a dictionary or array of dictionary that specify output statistics to return for each group. The following specification must be used:\n\n - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The name of the column to store the result of the given statistical query in the output FeatureSet.\n - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A SQL-92 expression or field name from which to query statistics.\n - **statistic**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The statistic type to query for the given field or expression. \nPossible Values: SUM \\| COUNT \\| MIN \\| MAX \\| AVG \\| STDEV \\| VAR\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"intersects","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#intersects","description":"Returns features from a FeatureSet that intersect another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that intersect the polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Intersects($layer, geom2) );\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(features, inputGeometry) -> FeatureSet","insertText":"Intersects(${1:features_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that intersect another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet that is tested for the intersects relationship to `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"length","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length","description":"Returns the length of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the planar length of the layer in meters\n\n```arcade\nLength($layer, 'meters')\n```\n\n","completion":{"label":"Length","detail":"Length(features, unit?) -> Number","insertText":"Length(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the length of the input FeatureSet in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d","description":"Returns the planar (i.e. Cartesian) length of the input FeatureSet taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the 3D length of the layer's features in meters\n\n```arcade\nLength3D($layer, 'meters')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(features, unit?) -> Number","insertText":"Length3D(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (i.e. Cartesian) length of the input FeatureSet taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the planar length in 3D space.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic","description":"Returns the geodetic length of the input FeatureSet in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic length of the layer in meters\n\n```arcade\nLengthGeodetic($layer, 'meters')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(features, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic length of the input FeatureSet in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet for which to calculate the geodetic length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic length calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"max","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#max","description":"Returns the highest value for a given numeric field from a FeatureSet.","examples":"\n**Examples**\n\nprints the max value of the population field for all features in the layer\n\n```arcade\nMax($layer, 'population')\n```\n\ncalculates the max population per square mile of all features in the layer\n\n```arcade\nMax($layer, 'population / area')\n```\n\n","completion":{"label":"Max","detail":"Max(features, fieldNameOrSQLExpression) -> Number","insertText":"Max(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the highest value for a given numeric field from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"mean","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#mean","description":"Returns the mean value of a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the difference between the feature's population and the mean population of all features in the layer\n\n```arcade\n$feature.population - Mean($layer, 'population')\n```\n\ncalculates the mean population per square mile of all features in the layer\n\n```arcade\nMean($layer, 'population / area')\n```\n\n","completion":{"label":"Mean","detail":"Mean(features, fieldNameOrSQLExpression) -> Number","insertText":"Mean(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to calculate the mean.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"min","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#min","description":"Returns the lowest value for a given numeric field from a FeatureSet.","examples":"\n**Examples**\n\nprints the min value of the population field for all features in the layer\n\n```arcade\nMin($layer, 'population')\n```\n\nreturns the minimum population per square mile of all features in the layer\n\n```arcade\nMin($layer, 'population / area')\n```\n\n","completion":{"label":"Min","detail":"Min(features, fieldNameOrSQLExpression) -> Number","insertText":"Min(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value for a given numeric field from a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"orderby","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#orderby","description":"Orders a FeatureSet by using a SQL92 OrderBy clause.","examples":"\n**Examples**\n\nOrder features by population where features with the highest population are listed first\n\n```arcade\nOrderBy($layer, 'POPULATION DESC')\n```\n\nOrder features by rank in ascending order\n\n```arcade\nOrderBy($layer, 'Rank ASC')\n```\n\n","completion":{"label":"OrderBy","detail":"OrderBy(features, sqlExpression) -> FeatureSet","insertText":"OrderBy(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nOrders a FeatureSet by using a SQL92 OrderBy clause.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet, or layer, to order.\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The SQL92 expression used to order features in the layer.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"overlaps","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#overlaps","description":"Returns features from a FeatureSet that overlap another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features that overlap the polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Overlaps($layer, geom2) );\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(overlappingFeatures, inputGeometry) -> FeatureSet","insertText":"Overlaps(${1:overlappingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that overlap another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **overlappingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features that are tested for the 'overlaps' relationship with `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'overlaps' relationship with `overlappingFeatures`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#schema","description":"Returns the schema description of the provided FeatureSet.","examples":"","completion":{"label":"Schema","detail":"Schema(features) -> Dictionary","insertText":"Schema(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the schema description of the provided FeatureSet.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet whose schema to return.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The objectId field of the FeatureSet.\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The global ID field of the FeatureSet. Returns `\"\"` if not globalId-enabled.\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The geometry type of features in the FeatureSet. Returns `esriGeometryNull` for tables with no geometry. \nPossible values: `esriGeometryPoint`, `esriGeometryLine`, `esriGeometryPolygon`, `esriGeometryNull`\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - Returns an array of dictionaries describing the fields in the FeatureSet. Each dictionary describes the field `name`, `alias`, `type`, `subtype`, `domain`, `length`, and whether it is `editable` and `nullable`."}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#stdev","description":"Returns the sample standard deviation for the values from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\nprints the standard deviation of values from the 'population' field\n\n```arcade\nStdev($layer, 'population')\n```\n\ncalculates the standard deviation of the population per square mile of all features in the layer\n\n```arcade\nStdev($layer, 'population / area')\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(features, fieldNameOrSQLExpression) -> Number","insertText":"Stdev(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sample standard deviation for the values from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"subtypes","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#subtypes","description":"Returns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.","examples":"\n**Example**\n\nReturns subtypes with coded values from a FeatureSet\n\n```arcade\nvar fsTransformer = FeatureSetByName($layer, \"Transformer\")\nSubtypes(fsTransformer)\n// returns the following dictionary\n// {\n// subtypeField: 'assetGroup',\n// subtypes: [\n// { name: \"Unknown\", code: 0 },\n// { name: \"Single Phase\", code: 1 },\n// { name: \"Two Phase\", code: 2 }\n// ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(features) -> Dictionary","insertText":"Subtypes(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the subtype coded value Dictionary. Returns `null` when subtypes are not enabled on the layer.\n\n**Parameter**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet from which to get subtypes.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below.\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field containing a subtype.\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)> - An array of dictionaries describing the subtypes. Each dictionary has a `code` property, which contains the actual field value, and a `name` property containing a user-friendly description of the value (e.g. `{ code: 1, name: \"pavement\" }`)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#sum","description":"Returns the sum of values returned from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\ncalculates the population of the current feature as a % of the total population of all features in the layer\n\n```arcade\n( $feature.population / Sum($layer, 'population') ) * 100\n```\n\ncalculates the total number of votes cast in an election for the entire dataset\n\n```arcade\nSum($layer, 'democrat + republican + other')\n```\n\n","completion":{"label":"Sum","detail":"Sum(features, fieldNameOrSQLExpression) -> Number","insertText":"Sum(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of values returned from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"top","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#top","description":"Truncates the FeatureSet and returns the first given number of features.","examples":"\n**Example**\n\nReturns the top 5 features with the highest population\n\n```arcade\nTop( OrderBy($layer, 'POPULATION DESC'), 5 )\n```\n\n","completion":{"label":"Top","detail":"Top(features, numItems) -> FeatureSet","insertText":"Top(${1:features_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nTruncates the FeatureSet and returns the first given number of features.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The FeatureSet to truncate.\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features to return from the beginning of the FeatureSet.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#touches","description":"Returns features from a FeatureSet that touch another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the layer that touch the geometry.\n\n```arcade\nvar geom = Polygon({ ... });\nCount( Touches($layer, geom) );\n```\n\n","completion":{"label":"Touches","detail":"Touches(touchingFeatures, inputGeometry) -> FeatureSet","insertText":"Touches(${1:touchingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that touch another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **touchingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The features to test the 'touches' relationship with `geometry`.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `touchingFeatures`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"variance","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#variance","description":"Returns the variance of the values from a given numeric field in a FeatureSet.","examples":"\n**Examples**\n\nprints the variance for the population field in the given layer\n\n```arcade\nVariance($layer, 'population')\n```\n\ncalculates the variance of the population per square mile of all features in the layer\n\n```arcade\nVariance($layer, 'population / area')\n```\n\n","completion":{"label":"Variance","detail":"Variance(features, fieldNameOrSQLExpression) -> Number","insertText":"Variance(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance of the values from a given numeric field in a FeatureSet.\n\n**Parameters**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - A FeatureSet on which to perform the operation.\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Specifies the name of a numeric field or SQL92 expression for which the statistic will be calculated from the input FeatureSet.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"within","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#within","description":"Returns features from a FeatureSet that contain the `innerGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the number of features in the layer within the polygon\n\n```arcade\nvar outerGeom = Polygon({ ... });\nCount( Within(outerGeom, $layer) );\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerFeatures) -> FeatureSet","insertText":"Within(${1:innerGeometry_}, ${2:outerFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns features from a FeatureSet that contain the `innerGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'within' relationship to `outerFeatures`.\n- **outerFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - The comparison features that are tested for the 'contains' relationship to `innerGeometry`.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**Additional resources**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"geometry_functions","title":"Geometry functions","items":[[{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle1","description":"Returns the arithmetic angle of a line between two points in degrees (0 - 360). The angle is measured in a counter-clockwise direction relative to east. For example, an angle of 90 degrees points due north.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or both Point geometries. _If the points are identical, then an angle of 0 degrees is returned._","examples":"\n**Example**\n\nReturns the angle from a Point to a Feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arithmetic angle of a line between two points in degrees (0 - 360). The angle is measured in a counter-clockwise direction relative to east. For example, an angle of 90 degrees points due north.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or both Point geometries. _If the points are identical, then an angle of 0 degrees is returned._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first Point or Feature used to calculate the angle.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second Point or Feature used to calculate the angle.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle2","description":"Returns the arithmetic angle of a line between three points in degrees (0 - 360). The angle is measured around `pointB` in a counter-clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._","examples":"\n**Example**\n\nReturns the angle between two points around the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature, pointC)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB, pointC) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arithmetic angle of a line between three points in degrees (0 - 360). The angle is measured around `pointB` in a counter-clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first Point or Feature used to calculate the angle.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second Point or Feature used to calculate the angle.\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The third Point or Feature used to calculate the angle.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"area","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area","description":"Returns the area of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the feature in square meters\n\n```arcade\nArea($feature, 'square-meters')\n```\n\n","completion":{"label":"Area","detail":"Area(polygon, unit?) -> Number","insertText":"Area(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the area of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The Polygon or Feature for which to calculate the planar area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards` \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic","description":"Returns the geodetic area of the input geometry or Feature in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic area of the feature in square meters\n\n```arcade\nAreaGeodetic($feature, 'square-meters')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(polygon, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic area of the input geometry or Feature in the given units. This is more reliable measurement of area than `Area()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The Polygon or Feature for which to calculate the geodetic area.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic area calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},[{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing1","description":"Returns the geographic angle of a line between two points in degrees (0 - 360). The bearing is measured in a clockwise direction relative to north. For example, a bearing of 225 degrees represents a southwest orientation.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or both Point geometries. _If the points are identical, then an angle of 0 is returned._","examples":"\n**Example**\n\nReturns the bearing from a point to the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geographic angle of a line between two points in degrees (0 - 360). The bearing is measured in a clockwise direction relative to north. For example, a bearing of 225 degrees represents a southwest orientation.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of either or both Point geometries. _If the points are identical, then an angle of 0 is returned._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first point used to calculate the bearing.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second point used to calculate the bearing.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing2","description":"Returns the geographic angle of a line between three points in degrees (0 - 360). The bearing is measured around `pointB` in a clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._","examples":"\n**Example**\n\nReturns the bearing between two points around the feature, in degrees\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature,pointC)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB, pointC) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geographic angle of a line between three points in degrees (0 - 360). The bearing is measured around `pointB` in a clockwise direction, from `pointA` to `pointC`.\n\nOnly the x-y plane is considered for the measurement. Any z-coordinates are ignored. Point features can be used instead of any or all Point geometries. _If the points are identical, then an angle of 0 or 180 degrees is returned (depending internal arithmetic)._\n\n**Parameters**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first point used to calculate the bearing.\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second point used to calculate the bearing.\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The third point used to calculate the bearing.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"buffer","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer","description":"Returns the planar (or Euclidean) buffer at a specified distance around the input geometry. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a polygon representing a 1/2-mile buffer around the input geometry\n\n```arcade\nBuffer($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"Buffer","detail":"Buffer(inputGeometry, distance, unit?) -> Polygon","insertText":"Buffer(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (or Euclidean) buffer at a specified distance around the input geometry. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to buffer.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance to buffer from the geometry.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the buffer `distance`. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [BufferGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"buffergeodetic","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic","description":"Returns the geodetic buffer at a specified distance around the input geometry. This is a geodetic measurement, which calculates distances on an ellipsoid.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns a polygon representing a 1/2-mile buffer around the input geometry\n\n```arcade\nBufferGeodetic($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"BufferGeodetic","detail":"BufferGeodetic(inputGeometry, distance, unit?, curveType?) -> Polygon","insertText":"BufferGeodetic(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic buffer at a specified distance around the input geometry. This is a geodetic measurement, which calculates distances on an ellipsoid.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to buffer.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance to buffer from the geometry.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the buffer `distance`. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic buffer calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Buffer()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"centroid","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#centroid","description":"Returns the centroid of the input geometry.","examples":"\n**Examples**\n\nReturns the centroid of the given polygon\n\n```arcade\nCentroid($feature)\n```\n\nReturns the centroid of the given polygon ring\n\n```arcade\nvar ringPoints = Geometry($feature).rings[0];\nCentroid(ringPoints);\n```\n\nReturns the centroid of the given polygon or polyline and ensures it is within the input geometry\n\n```arcade\nCentroid($feature, 'labelPoint')\n```\n\n","completion":{"label":"Centroid","detail":"Centroid(polygon, algorithm?) -> Point","insertText":"Centroid(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the centroid of the input geometry.\n\n**Parameters**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The polygon or array of points composing a polygon.\n- **algorithm** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.29_ The method determining the position of the centroid. Possible values:\n\n - `geometric`: (default) Returns the true centroid of the geometry. The geometric centroid for an array of points will return the mean of all the points, whereas for polygons, the geometric centroid is representative of the shape's area. For irregular polygons, the geometric centroid may not be within the polygon itself. For polylines, the geometric centroid may not be on the line itself.\n\n - `labelPoint`: For polygons, ensures the centroid returned from this function is within the polygon itself. For polylines, ensures the centroid is on the line itself.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"clip","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#clip","description":"Calculates the clipped geometry from a target geometry by an envelope.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area of the clipped geometry\n\n```arcade\nvar envelope = Extent({ ... });\nArea(Clip($feature, envelope), 'square-miles');\n```\n\n","completion":{"label":"Clip","detail":"Clip(inputGeometry, envelope) -> Geometry","insertText":"Clip(${1:inputGeometry_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the clipped geometry from a target geometry by an envelope.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to be clipped.\n- **envelope**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent) - The envelope used to clip the `geometry`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#contains","description":"Indicates if one geometry contains another geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\nReturns true if the feature is contained within the given polygon\n\n```arcade\nvar container = Polygon({ ... });\nContains(containerGeometry, $feature);\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideGeometry) -> Boolean","insertText":"Contains(${1:containerGeometry_}, ${2:insideGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry contains another geometry.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'contains' relationship to `insideGeometry`. Think of this geometry as the potential 'container' of the `insideGeometry`.\n- **insideGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the 'within' relationship to the `containerGeometry`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"convertdirection","bundle":"geometry","sinceVersion":"1.13","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convertdirection","description":"Angles can have several interpretations and can be represented as a number, a text, or a well formed array. This function takes one input representation and converts it to another.\n\nThe input value is described by a dictionary that specified the type of angle and the type of direction. If the `angleType` and `directionType` are not appropriate for the input, then the conversion will fail.\n\nThe desired output value is described by a dictionary that specifies output type, angle type, direction type, and an optional format for text output.\n\nIf the output type is `value`: \n - an array will be returned for angle type `dms` or for direction type `quadrant` \n - a number will be returned for all the other cases\n\nIf the output type is `text`, then default padding and delimiters will be used unless the optional`format` property is provided. \n`format` controls order, spacing, padding, and delimiters in the output text. \nStrings of format specifier characters before a decimal point indicate minimum padding (e.g. `DDD -> 000`). \nStrings of format characters after a decimal point indicate precision (e.g. `D.DD -> 0.00`).\n\nSupported `format` characters: \n- `D` - Degrees \n- `R` - Radians \n- `G` - Gradians \n- `d` - DMS Degrees \n- `m` - DMS Minutes \n- `s` - DMS Seconds \n- `P` - Long Meridian (e.g. `North` vs. `South`) \n- `p` - Short Meridian (e.g. `N` vs. `S`) \n- `B` - Long direction (e.g. `East` vs. `West`) \n- `b` - Short direction (e.g. `E` vs. `W`) \n- `[ ]` - Escape characters \n\n\nFor `dms` formatting, if the `s` is not used then `m` will round to the nearest minute. Similarly, if `m` is not used then `d` will round.","examples":"\n**Examples**\n\nExamples where the `outputType` is `value`.\n\n```arcade\nConvertDirection( 30, {directionType:'North', angleType: 'Degrees'}, {directionType:'Quadrant', angleType: 'DMS', outputType: 'value'})\n// returns ['N', 30, 0, 0, 'E']\n \nConvertDirection( 25.99, {directionType:'North', angleType : 'Gradians'}, {directionType:'North', outputType: 'value', angleType : 'Gradians'})\n// returns 25.99\n \nConvertDirection( 1, {directionType:'North', angleType: 'DEGREES'}, {directionType: 'Quadrant', angleType: 'Degrees', outputType: 'value'})\n// returns ['N',1,'E']\n \nConvertDirection( 0.9, {directionType: 'North', angleType: 'degrees'}, {directionType:'North', angleType: 'gradians', outputType: 'value'})\n// returns 1.0 \n \nConvertDirection( 180.0, {directionType:'North', angleType: 'degrees'}, {directionType:'North', angleType: 'radians', outputType : 'value'})\n// returns PI\n```\n\nExamples where `outputType` is `text`.\n\n```arcade\nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'DDDD.D'})\n// returns '0025.3'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'R'})\n// returns '0'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: '[DD.DD]'})\n// returns 'DD.DD'\n \nConvertDirection( 25.34, {directionType:'North', angleType: 'DEGREES'}, {directionType:'quadrant', outputType: 'text', format: 'P B'})\n// returns 'North East'\n \nConvertDirection( [001,01,59.99], {directionType:'North', angleType: 'DMS'}, {directionType:'North', angleType: 'DMS', outputType: 'text', format: 'dddA mm[B] ssC'})\n// returns '001A 02B 00C'\n```\n\n","completion":{"label":"ConvertDirection","detail":"ConvertDirection(input, inputSpec, outputSpec) -> Array<Number|Text>,Number,Text","insertText":"ConvertDirection(${1:input_}, ${2:inputSpec_}, ${3:outputSpec_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.13](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAngles can have several interpretations and can be represented as a number, a text, or a well formed array. This function takes one input representation and converts it to another.\n\nThe input value is described by a dictionary that specified the type of angle and the type of direction. If the `angleType` and `directionType` are not appropriate for the input, then the conversion will fail.\n\nThe desired output value is described by a dictionary that specifies output type, angle type, direction type, and an optional format for text output.\n\nIf the output type is `value`: \n - an array will be returned for angle type `dms` or for direction type `quadrant` \n - a number will be returned for all the other cases\n\nIf the output type is `text`, then default padding and delimiters will be used unless the optional`format` property is provided. \n`format` controls order, spacing, padding, and delimiters in the output text. \nStrings of format specifier characters before a decimal point indicate minimum padding (e.g. `DDD -> 000`). \nStrings of format characters after a decimal point indicate precision (e.g. `D.DD -> 0.00`).\n\nSupported `format` characters: \n- `D` - Degrees \n- `R` - Radians \n- `G` - Gradians \n- `d` - DMS Degrees \n- `m` - DMS Minutes \n- `s` - DMS Seconds \n- `P` - Long Meridian (e.g. `North` vs. `South`) \n- `p` - Short Meridian (e.g. `N` vs. `S`) \n- `B` - Long direction (e.g. `East` vs. `West`) \n- `b` - Short direction (e.g. `E` vs. `W`) \n- `[ ]` - Escape characters \n\n\nFor `dms` formatting, if the `s` is not used then `m` will round to the nearest minute. Similarly, if `m` is not used then `d` will round.\n\n**Parameters**\n\n- **input**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A raw representation of the bearing. The type of `input` and the values of the `inputSpec` dictate how the input is parsed.\n- **inputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Contains information about how to interpret input.\n\n - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the input angle unit. Supported Values: `DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the input bearing's meridian and direction. Supported Values: `NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n- **outputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Contains information about how to format the output.\n\n - **outputType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Controls output type. Supported Values: `value`, `text`\n - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the output angle unit. Supported Values: `DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Describes the output bearing's meridian and direction. Supported Values: `NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n - **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Controls text formatting. Only applicable if `outputType` is `text`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"convexhull","bundle":"geometry","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convexhull","description":"Calculates the convex hull of a geometry. A convex hull is the smallest convex polygon that encloses a geometry. The hull is typically a polygon but can also be a polyline or a point in degenerate cases.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Examples**\n\nReturns the number of vertices in the convex hull geometry of the current feature's geometry\n\n```arcade\nCount(ConvexHull(Geometry($feature)).Rings[0])\n```\n\nReturns the convex hull of a geometry which has a concave region (which the convex hull will ignore)\n\n```arcade\nvar pacman_like_shape = Polygon({\n \"rings\": [[[1, 2], [2, 0], [1, -2], [-1, -2], [-2, -1], [-1, -1.5], [0, -1.5], [-2, 1], [-1, 2]]],\n \"spatialReference\": { \"wkid\": 3857 }\n});\nreturn ConvexHull(pacman_like_shape).rings[0];\n// Returns the geometry [[1,2],[2,0],[1,-2],[-1,-2],[-2,-1],[-2,1],[-1,2],[1,2]]\n```\n\n","completion":{"label":"ConvexHull","detail":"ConvexHull(inputGeometry) -> Geometry","insertText":"ConvexHull(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the convex hull of a geometry. A convex hull is the smallest convex polygon that encloses a geometry. The hull is typically a polygon but can also be a polyline or a point in degenerate cases.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point, line, or polygon geometry to be analyzed.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#crosses","description":"Indicates if one geometry crosses another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the feature crosses the given polygon\n\n```arcade\nvar geom2 = Polygon({ ... });\nCrosses($feature, geom2);\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(geometry1, geometry2) -> Boolean","insertText":"Crosses(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry crosses another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to cross.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being crossed.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"cut","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#cut","description":"Splits the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all resulting left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry. Each undefined cut, along with any uncut parts, are output as separate Polylines.\n\nFor Polygons, all resulting left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nCuts the feature's geometry with the given polyline\n\n```arcade\nvar cutter = Polyline({ ... });\nCut($feature, cutter));\n```\n\n","completion":{"label":"Cut","detail":"Cut(polylineOrPolygon, cutter) -> Array<Geometry>","insertText":"Cut(${1:polylineOrPolygon_}, ${2:cutter_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSplits the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all resulting left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry. Each undefined cut, along with any uncut parts, are output as separate Polylines.\n\nFor Polygons, all resulting left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **polylineOrPolygon**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to cut.\n- **cutter**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Polyline used to cut the `geometry`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue1","description":"Returns a specified default value if a key in a geometry does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nPoint that has a z-value\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is true\n// returns the value of Geometry($feature).z\n```\n\nPoint that does not have a z-value\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is false\n// returns 1000\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a key in a geometry does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The input geometry to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the key does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue2","description":"Returns a specified default value if at least one of the keys in a geometry's nested properties does not exist or the value at the specified key is `null` or an empty text value.","examples":"\n**Examples**\n\nRing, coordinate, and x value all exist and have a value\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"z\"], 1000)\n// returns 100\n```\n\nRing does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",2,0,\"z\"], 1000)\n// returns 1000\n```\n\nRing and coordinate exist, but m-value does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"m\"], 100)\n// returns 100\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if at least one of the keys in a geometry's nested properties does not exist or the value at the specified key is `null` or an empty text value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The input geometry to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the container's structure.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if at least one of the keys or indices does not exist or the value at the specified key is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value at the specified key or index if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"densify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify","description":"Densifies geometries by inserting vertices to create segments no longer than the specified interval.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the densified geometry with a maximum segment length of 10 m\n\n```arcade\nvar maxLength = 10;\nDensify($feature, maxLength, 'meters');\n```\n\n","completion":{"label":"Densify","detail":"Densify(inputGeometry, maxSegmentLength, unit?) -> Geometry","insertText":"Densify(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nDensifies geometries by inserting vertices to create segments no longer than the specified interval.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be densified.\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum segment length allowed. Must be a positive value.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [DensifyGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"densifygeodetic","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic","description":"Creates a geodesic between each of the input geometry's vertices and densifies the output geometry with additional vertices to create segments no longer than the specified interval.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the densified geometry with a maximum segment length of 10000\n\n```arcade\nDensifyGeodetic($feature, 10000, 'meters');\n```\n\n","completion":{"label":"DensifyGeodetic","detail":"DensifyGeodetic(inputGeometry, maxSegmentLength, unit?, curveType?) -> Geometry","insertText":"DensifyGeodetic(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a geodesic between each of the input geometry's vertices and densifies the output geometry with additional vertices to create segments no longer than the specified interval.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be densified.\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum segment length allowed. Must be a positive value.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic densify calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [Densify()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"difference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#difference","description":"Performs the topological difference operation for the two geometries. The resultant geometry comes from `inputGeometry`, not the `subtractor`. The dimension of `subtractor` has to be equal to or greater than that of `inputGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nSubtracts the given polygon area from the feature.\n\n```arcade\nvar subtractor = Polygon({ ... });\nDifference($feature, subtractor);\n```\n\n","completion":{"label":"Difference","detail":"Difference(inputGeometry, subtractor) -> Geometry","insertText":"Difference(${1:inputGeometry_}, ${2:subtractor_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the topological difference operation for the two geometries. The resultant geometry comes from `inputGeometry`, not the `subtractor`. The dimension of `subtractor` has to be equal to or greater than that of `inputGeometry`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry from which to subtract.\n- **subtractor**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to subtract from `geometry`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"disjoint","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#disjoint","description":"Indicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries don't intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nDisjoint($feature, geom2);\n```\n\n","completion":{"label":"Disjoint","detail":"Disjoint(geometry1, geometry2) -> Boolean","insertText":"Disjoint(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'disjoint' relationship to `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'disjoint' relationship to `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Disjoint](https://esri.github.io/geometry-api-java/doc/Disjoint.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distance","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance","description":"Returns the planar distance between two geometries in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the distance between two geometries in meters\n\n```arcade\nvar geom2 = Point({ ... });\nDistance($feature, geom2, 'meters')\n```\n\n","completion":{"label":"Distance","detail":"Distance(geometry1, geometry2, unit?) -> Number","insertText":"Distance(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar distance between two geometries in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry used to measure the distance from `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry used to measure the distance from `geometry1`.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [DistanceGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"distancegeodetic","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic","description":"Calculates the shortest distance between two points along a great circle.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the distance from a bus in a stream layer to the central station in kilometers\n\n```arcade\nvar unionStation = Point({\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }});\ndistanceGeodetic($feature, unionStation, 'kilometers');\n```\n\n","completion":{"label":"DistanceGeodetic","detail":"DistanceGeodetic(point1, point2, unit?, curveType?) -> Number","insertText":"DistanceGeodetic(${1:point1_}, ${2:point2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the shortest distance between two points along a great circle.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **point1**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point used to measure the distance from `point2`.\n- **point2**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point used to measure the distance from `point1`.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic distance calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Distance()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"distancetocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancetocoordinate","description":"Returns a coordinate along an input line based on a given distance. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. If the distance is not found along the input line, then the result will be `null`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the coordinate of the input polyline based on the given distance value\n\n```arcade\nvar result = DistanceToCoordinate($feature, 1038);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"DistanceToCoordinate","detail":"DistanceToCoordinate(inputLine, inputDistance) -> Dictionary","insertText":"DistanceToCoordinate(${1:inputLine_}, ${2:inputDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a coordinate along an input line based on a given distance. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. If the distance is not found along the input line, then the result will be `null`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to find a coordinate. When using a Feature as input, the feature's geometry must be a polyline.\n- **inputDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The distance used to find the coordinate along `inputLine` from the start of the line. All parts of the line are considered when attempting to find a coordinate at the given distance. The distance does not include gaps between paths (or parts) of the line. \n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties. If the distance is not found along the input line, then the result will be `null`.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The coordinates of a point along `inputLine` based on the given distance value.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"envelopeintersects","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#envelopeintersects","description":"Indicates if the envelope (or extent) of one geometry intersects the envelope of another geometry. In the graphic below, the red highlight indicates the scenarios where the function will return `true`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nEnvelopeIntersects($feature, geom2);\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(geometry1, geometry2) -> Boolean","insertText":"EnvelopeIntersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the envelope (or extent) of one geometry intersects the envelope of another geometry. In the graphic below, the red highlight indicates the scenarios where the function will return `true`.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the intersects relationship to the other geometry.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#equals","description":"Indicates if two geometries are equal, or geographically equivalent given the spatial reference and tolerance of the data. The two input geometries don't have to be clones to be considered equal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `Geometry($feature)`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries are equal\n\n```arcade\nvar geom2 = Point({ ... });\nEquals(Geometry($feature), geom2);\n```\n\n","completion":{"label":"Equals","detail":"Equals(geometry1, geometry2) -> Boolean","insertText":"Equals(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if two geometries are equal, or geographically equivalent given the spatial reference and tolerance of the data. The two input geometries don't have to be clones to be considered equal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `Geometry($feature)`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The first input geometry.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The second input geometry.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Equals](https://esri.github.io/geometry-api-java/doc/Equals.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent1","description":"Constructs an Extent object from a dictionary.","examples":"\n**Example**\n\nCreates an Extent object\n\n```arcade\nExtent({\n xMax: -95.34,\n xMin: -97.06138,\n yMax: 32.837,\n yMin: 12.003,\n hasM: false,\n hasZ: false,\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Extent","detail":"Extent(geometryDefinition) -> Extent","insertText":"Extent(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs an Extent object from a dictionary.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Extent geometry object.\n\n - **xMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible x-coordinate of the geometry.\n - **xMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible x-coordinate of the geometry.\n - **yMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible y-coordinate of the geometry.\n - **yMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible y-coordinate of the geometry.\n - **mMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible m-value of the geometry. If setting this value, then you must set `hasM` to `true`.\n - **mMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible m-value of the geometry. If setting this value, then you must set `hasM` to `true`.\n - **zMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound, or largest possible z-value of the geometry. If setting this value, then you must set `hasZ` to `true`.\n - **zMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound, or smallest possible z-value of the geometry. If setting this value, then you must set `hasZ` to `true`.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent2","description":"Returns the extent of an input Feature, Polygon, Point, Polyline or Multipoint.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the extent of a feature\n\n```arcade\nExtent($feature);\n```\n\n","completion":{"label":"Extent","detail":"Extent(inputGeometry) -> Extent","insertText":"Extent(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the extent of an input Feature, Polygon, Point, Polyline or Multipoint.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The Feature or Geometry from which to get an extent.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent3","description":"Constructs an Extent object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Envelope objects.","examples":"\n**Example**\n\nCreates an Extent object from JSON\n\n```arcade\nvar extentJSON = '{\"xmin\": -109.55, \"ymin\": 25.76, \"xmax\": -86.39, \"ymax\": 49.94, \"spatialReference\": { \"wkid\": 3857 }}';\nExtent(extentJSON);\n```\n\n","completion":{"label":"Extent","detail":"Extent(jsonDefinition) -> Extent","insertText":"Extent(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs an Extent object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Envelope objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text from which to construct the extent object.\n\n**Return value**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Envelope objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#ENVELOPE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"generalize","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#generalize","description":"Reduces the number of vertices in the input geometry based on a given deviation value. Point and Multipoint geometries are left unchanged. Envelopes are converted to Polygons and then generalized.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a generalized version of the input geometry\n\n```arcade\n// Removes vertices so segments are no more than 100 meters from the original geometry\nGeneralize($feature, 100, true, 'meters')\n```\n\n","completion":{"label":"Generalize","detail":"Generalize(inputGeometry, maxDeviation, removeDegenerateParts?, maxDeviationUnit?) -> Geometry","insertText":"Generalize(${1:inputGeometry_}, ${2:maxDeviation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReduces the number of vertices in the input geometry based on a given deviation value. Point and Multipoint geometries are left unchanged. Envelopes are converted to Polygons and then generalized.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry to be generalized.\n- **maxDeviation**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The maximum allowed deviation from the generalized geometry to the original geometry.\n- **removeDegenerateParts** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - When `true` the degenerate parts of the geometry will be removed from the output (may be undesired for drawing).\n- **maxDeviationUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for maxDeviation. Defaults to the units of the input geometry. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"geometry","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#geometry","description":"Constructs a Geometry object from serialized JSON text or a dictionary. The JSON schema must follow the ArcGIS REST API JSON specification for Geometry objects. This function may also return the Geometry of an input feature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Examples**\n\nReturns the geometry of the feature\n\n```arcade\nGeometry($feature)\n```\n\nConstructs a point geometry. This can be done with any geometry type.\n\n```arcade\nvar pointJSON = {\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 } };\nGeometry(pointJSON);\n```\n\n","completion":{"label":"Geometry","detail":"Geometry(inputFeature) -> Geometry","insertText":"Geometry(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Geometry object from serialized JSON text or a dictionary. The JSON schema must follow the ArcGIS REST API JSON specification for Geometry objects. This function may also return the Geometry of an input feature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Feature or JSON from which to construct the geometry object. Starting at version 1.25, the input JSON text or dictionary definitions for Polygons or Polylines may contain curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Geometry objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm)\n"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue1","description":"Indicates whether a geometry has a value at a given key or index.","examples":"\n**Examples**\n\nPoint that has a z value\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Point\"){\n return HasValue(Geometry($feature), \"z\")\n // returns true\n}\n```\n\nPolygon with key that does not exist\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Polygon\"){\n return HasValue(Geometry($feature), \"verticalCoordinateSystem\")\n // returns false\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, key) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a geometry has a value at a given key or index.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The key or property name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue2","description":"Checks whether a property or index nested several levels deep in a geometry has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.","examples":"\n**Examples**\n\nRing, coordinate, and x value all exist and have a value\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,0,\"x\"])){\n // if() evaluates to true, thus executing the return\n return shape.rings[0][0].x;\n // returns -97.06138\n}\n```\n\nRing does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",2,0,\"x\"])){\n // if() evaluates to false, thus not executing the return\n return shape.rings[2][0].x;\n // polygon only has one ring; there is not a third ring\n}\n```\n\nRing and coordinate exist, but m value does not exist\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n rings: [[\n Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n ]],\n hasZ: true,\n spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,3,\"m\"])){\n // if() evaluates to false, thus not executing the return\n return shape.rings[0][3].m;\n // there is a coordinate at this location, but it does not have an m value\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, keys) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nChecks whether a property or index nested several levels deep in a geometry has a value. This allows you to drill into a nested structure in one step rather than check values at each level. Returns `true` if the keys and indexes at each level of the structure exist and include a non-null value.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to check.\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the keys or indexes to check in each level of the structure.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"intersection","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersection","description":"Constructs the set-theoretic intersection between two geometries and returns a new geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the area common to both polygons\n\n```arcade\nvar geom2 = Polygon({ ... });\nArea(Intersection($feature, geom2), 'square-miles');\n```\n\n","completion":{"label":"Intersection","detail":"Intersection(geometry1, geometry2) -> Geometry","insertText":"Intersection(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic intersection between two geometries and returns a new geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to intersect with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to intersect with `geometry1`.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"intersects","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersects","description":"Indicates if one geometry intersects another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries intersect\n\n```arcade\nvar geom2 = Polygon({ ... });\nIntersects($feature, geom2);\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(geometry1, geometry2) -> Boolean","insertText":"Intersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry intersects another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry that is tested for the intersects relationship to `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry being intersected.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"isselfintersecting","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#isselfintersecting","description":"Indicates whether the input geometry has rings, paths, or points that intersect or cross other parts of the geometry. For example, a single polyline feature whose paths intersect each other or a polygon with rings that self intersect would return `true`. ","examples":"\n**Example**\n\nReturns true if the polyline's paths intersect each other\n\n```arcade\nvar polyline = Polyline({ ... });\nIsSelfIntersecting(polyline);\n```\n\n","completion":{"label":"IsSelfIntersecting","detail":"IsSelfIntersecting(inputGeometry) -> Boolean","insertText":"IsSelfIntersecting(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the input geometry has rings, paths, or points that intersect or cross other parts of the geometry. For example, a single polyline feature whose paths intersect each other or a polygon with rings that self intersect would return `true`. \n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The polygon, polyline, or multipoint geometry to test for the self intersection.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"issimple","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#issimple","description":"Indicates if the given geometry is topologically simple.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometry is topologically simple\n\n```arcade\nIsSimple($feature);\n```\n\n","completion":{"label":"IsSimple","detail":"IsSimple(inputGeometry) -> Boolean","insertText":"IsSimple(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the given geometry is topologically simple.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The input geometry.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"length","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length","description":"Returns the length of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the planar length of the feature in kilometers\n\n```arcade\nLength($feature, 'kilometers')\n```\n\n","completion":{"label":"Length","detail":"Length(inputGeometry, unit?) -> Number","insertText":"Length(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the length of the input geometry or Feature in the given units. This is a planar measurement using Cartesian mathematics.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry or geometries for which to calculate the planar length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"geometry","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d","description":"Returns the planar (i.e. Cartesian) length of the input geometry or Feature taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Examples**\n\nReturns the 3D planar length of the feature in the unit of the spatial reference of the context executing the expression.\n\n```arcade\nLength3D($feature)\n```\n\nReturns the 3D planar length of the feature in feet.\n\n```arcade\nLength3D($feature, 'feet')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(inputGeometry, unit?) -> Number","insertText":"Length3D(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the planar (i.e. Cartesian) length of the input geometry or Feature taking height or Z information into account. The geometry provided to this function must be assigned a projected coordinate system. If the spatial reference does not provide a value for Z units, then the result will be returned in meters. Keep in mind that not all clients (such as the 3.x series of the ArcGIS API for JavaScript) support requesting Z values even when the data contains Z information.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry or Feature for which to calculate the planar length in 3D space.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic","description":"Returns the geodetic length of the input geometry or Feature in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.","examples":"\n**Example**\n\nReturns the geodetic length of the feature in kilometers\n\n```arcade\nLengthGeodetic($feature, 'kilometers')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(inputGeometry, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the geodetic length of the input geometry or Feature in the given units. This is more reliable measurement of length than `Length()` because it takes into account the Earth's curvature.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Note:** As of version 1.30, this function can be used with geometries of any spatial reference. In previous versions, support was limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - The geometry for which to calculate the geodetic length.\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit of the return value. This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _Since 1.31_ The type of curve to use for the geodetic length calculation. If no value is provided, the default is `Geodesic`. \nPossible values: \n - `Geodesic` - Defined by the shortest distance between two points on an ellipsoid. \n - `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points. \n - `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines. \n - `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points. \n - `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"measuretocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#measuretocoordinate","description":"Returns the first coordinate along an input line based on a given measure, or m-value. If the measure is not found along the input line, then the result will be `null`. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the coordinate of the input polyline based on the given measure value\n\n```arcade\nvar result = MeasureToCoordinate(Geometry($feature), 110);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"MeasureToCoordinate","detail":"MeasureToCoordinate(inputLine, inputMeasure) -> Dictionary","insertText":"MeasureToCoordinate(${1:inputLine_}, ${2:inputMeasure_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the first coordinate along an input line based on a given measure, or m-value. If the measure is not found along the input line, then the result will be `null`. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to find a coordinate. The input line must have `hasM` equal to `true`. If `hasM` is `false`, then `null` will be returned. When using a Feature as input, the feature's geometry must be a polyline.\n- **inputMeasure**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The measure, or m-value, from which to find a coordinate along `inputLine` from the start of the line. All parts of the line are considered when attempting to find a coordinate at the given measure. The measure does not include gaps between paths (or parts) of the line.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties. If the measure is not found along the input line, then the result will be `null`.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The first coordinate of a point along `inputLine` based on the given measure value.\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the start of the `inputLine` measured along the line to the `coordinate`. In polylines where paths do not connect, the `distanceAlong` value does not include the distance of the gaps between the starting and ending vertices of the paths.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"multiparttosinglepart","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multiparttosinglepart","description":"Converts a multi-part geometry into separate geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns an array of single-part geometries from a multi-part geometry\n\n```arcade\nvar allParts = MultiPartToSinglePart($feature)\n```\n\n","completion":{"label":"MultiPartToSinglePart","detail":"MultiPartToSinglePart(inputGeometry) -> Array<Geometry>","insertText":"MultiPartToSinglePart(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a multi-part geometry into separate geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The multi-part geometry to break into single parts.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint1","description":"Constructs a Multipoint object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a Multipoint with only x, y coordinates\n\n```arcade\nMultipoint({\n points: [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832],\n [-97.06138,32.837]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with m values\n\n```arcade\nMultipoint({\n hasM: true,\n points: [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50],\n [-97.06138,32.837,0]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with z values\n\n```arcade\nMultipoint({\n hasZ: true,\n points: [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500],\n [-97.06138,32.837,1000]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Multipoint with z and m values\n\n```arcade\nMultipoint({\n hasM: true,\n hasZ: true,\n points: [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50],\n [-97.06138,32.837,1000,0]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Multipoint object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Multipoint geometry object.\n\n - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of coordinates representing point locations.\n\n - **singlePoint**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single point or coordinate. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint2","description":"Constructs a Multipoint object from a dictionary using an array of Point objects.","examples":"\n**Example**\n\nCreates a Multipoint with only x, y coordinates\n\n```arcade\nMultipoint({\n points: [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Multipoint object from a dictionary using an array of Point objects.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Multipoint geometry object.\n\n - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of point objects.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint3","description":"Constructs a Multipoint object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Multipoint objects.","examples":"\n**Example**\n\n```arcade\n// Creates a Multipoint object\nvar multipointJSON = '{\"points\": [[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]],\"spatialReference\" : { \"wkid\": 3857 }}';\nMultipoint(multipointJSON);\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(jsonDefinition) -> Multipoint","insertText":"Multipoint(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"Constructs a Multipoint object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Multipoint objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the multipoint geometry object.\n\n**Return value**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Multipoint objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#MULTIPOINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"nearestcoordinate","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestcoordinate","description":"Returns the nearest coordinate (not vertex) of the input geometry to the search point. The returned dictionary also includes the shortest planar distance from the search point to the nearest coordinate. If the search point intersects the input geometry, then the search point is returned as the result with a distance of zero.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the nearest coordinate from the input polygon along with the distance to that coordinate\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['*'],\n true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestCoordinate(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestCoordinate","detail":"NearestCoordinate(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestCoordinate(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest coordinate (not vertex) of the input geometry to the search point. The returned dictionary also includes the shortest planar distance from the search point to the nearest coordinate. If the search point intersects the input geometry, then the search point is returned as the result with a distance of zero.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry from which to get the nearest coordinate.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point from which to find the nearest coordinate of the `inputGeometry`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The closest coordinate from the `inputGeometry` to the `searchPoint`.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the closest coordinate to the `searchPoint`. This represents the shortest distance between the `inputGeometry` and the `searchPoint`.\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The spatial relationship between the `searchPoint` and the segment of the `inputGeometry` leading up to the nearest coordinate. Possible values: \n\n`left` - The `searchPoint` is on the left side of the `inputGeometry`.\n\n`right` - The `searchPoint` is on the right side of the `inputGeometry`.\n\n`straddle` - The `searchPoint` straddles or is on top of the `inputGeometry`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"nearestvertex","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestvertex","description":"Returns the nearest vertex of the input geometry to the search point. The returned dictionary includes the planar distance from the search point to the nearest vertex.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the nearest vertex from the input polygon along with the distance to that vertex\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['*'],\n true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestVertex(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestVertex","detail":"NearestVertex(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestVertex(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest vertex of the input geometry to the search point. The returned dictionary includes the planar distance from the search point to the nearest vertex.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry from which to get the nearest vertex.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The point from which to find the nearest vertex of the `inputGeometry`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point location representing the nearest vertex from the `inputGeometry` to the `searchPoint`.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the input geometry's closest vertex to the `searchPoint`.\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The spatial relationship between the `searchPoint` and the segment of the `inputGeometry` leading up to the nearest vertex. Possible values: \n\n`left` - The `searchPoint` is on the left side of the `inputGeometry`.\n\n`right` - The `searchPoint` is on the right side of the `inputGeometry`.\n\n`straddle` - The `searchPoint` straddles or is on top of the `inputGeometry`."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"offset","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#offset","description":"Creates a geometry that is a constant planar distance from an input geometry. It is similar to buffering, but produces a one-sided result.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the offset geometry\n\n```arcade\nOffset($feature, 10, 'meters', 'square');\n```\n\n","completion":{"label":"Offset","detail":"Offset(inputGeometry, offsetDistance, offsetUnit?, joinType?, bevelRatio?, flattenError?) -> Geometry","insertText":"Offset(${1:inputGeometry_}, ${2:offsetDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a geometry that is a constant planar distance from an input geometry. It is similar to buffering, but produces a one-sided result.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to offset. Point geometries are not supported.\n- **offsetDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance to offset from the input geometry. If `offsetDistance > 0`, then the offset geometry is constructed to the right of the input geometry, if `offsetDistance = 0`, then there is no change in the geometries, otherwise it is constructed to the left. The direction of the paths or rings of the input geometry determines which side of the geometry is considered right, and which side is considered left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the right side of a simple polygon is always its inside.\n- **offsetUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Measurement unit for `offsetDistance`. Defaults to the units of the input geometry. \nPossible values: `centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **joinType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The join type. Possible values are `round`, `bevel`, `miter`, or `square`.\n- **bevelRatio** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applicable when `joinType = 'miter'`; `bevelRatio` is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled.\n- **flattenError** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Applicable when `joinType = 'round'`; `flattenError` determines the maximum distance of the resulting segments compared to the true circular arc. The algorithm never produces more than around 180 vertices for each round join.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":6}},{"type":"function","name":"overlaps","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#overlaps","description":"Indicates if one geometry overlaps another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries overlap\n\n```arcade\nvar geom2 = Polygon({ ... });\nOverlaps($feature, geom2);\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(geometry1, geometry2) -> Boolean","insertText":"Overlaps(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry overlaps another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'overlaps' relationship with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'overlaps' relationship with `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point1","description":"Constructs a Point object from a dictionary.","examples":"\n**Examples**\n\nCreates a Point with only x, y coordinates\n\n```arcade\nPoint({\n x: -97.06138,\n y: 32.837,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with m values\n\n```arcade\nPoint({\n hasM: true,\n x: -97.06138,\n y: 32.837,\n m: 15,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with z values\n\n```arcade\nPoint({\n hasZ: true,\n x: -97.06138,\n y: 32.837,\n z: 1500,\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Point with z and m values\n\n```arcade\nPoint({\n hasM: true,\n hasZ: true,\n x: -97.06138,\n y: 32.837,\n z: 1500,\n m: 15,\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Point","detail":"Point(geometryDefinition) -> Point","insertText":"Point(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Point object from a dictionary.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Point geometry object.\n\n - **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The x-coordinate (longitude) of the point location.\n - **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The y-coordinate (latitude) of the point location.\n - **m**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The m-value (measure) of the point location. If providing an m-value, then you must set `hasM` to `true`.\n - **z**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The z-value (elevation or height) of the point location. If providing a z-value, then you must set `hasZ` to `true`.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point2","description":"Constructs a Point object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Point objects.","examples":"\n**Example**\n\n```arcade\n// Creates a Point object\nvar pointJSON = '{ \"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }}';\nPoint(pointJSON)\n```\n\n","completion":{"label":"Point","detail":"Point(jsonDefinition) -> Point","insertText":"Point(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Point object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Point objects.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the point geometry object.\n\n**Return value**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Point objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"pointtocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#pointtocoordinate","description":"Returns the nearest coordinate and distance to that coordinate of the search point to the input line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the distance to the nearest coordinate along the input polyline based on the clicked location to open a popup\n\n```arcade\nvar result;\n\nif (TypeOf($userInput) == \"Point\"){\n result = PointToCoordinate(Geometry($feature), $userInput);\n}\n\nreturn result.distanceAlong;\n```\n\n","completion":{"label":"PointToCoordinate","detail":"PointToCoordinate(inputLine, searchPoint) -> Dictionary","insertText":"PointToCoordinate(${1:inputLine_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the nearest coordinate and distance to that coordinate of the search point to the input line.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The line or path from which to get the nearest coordinate. When using a Feature as input, the feature's geometry must be a polyline.\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point from which to find the nearest coordinate of the `inputLine`.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary with the following properties.\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - The point coordinate representing the nearest coordinate along the `inputLine` to the `searchPoint`. If `hasZ` is `false` in `searchPoint`, then the search is performed in x/y coordinates and the z-value is interpolated.\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the `searchPoint` to the `coordinate`.\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The planar distance from the start of the `inputLine` measured along the line to the `coordinate`. In polylines where paths do not connect, the `distanceAlong` value does not include the distance of the gaps between the starting and ending vertices of the paths.\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - In the case of a polyline input, the index of the path to which the `coordinate` belongs.\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index (relative to the path) of the line segment to which the `coordinate` belongs. If `coordinate` represents a vertex of the input line, then `segmentId` will return the index of the previous vertex. If `coordinate` is the first vertex of `inputLine`, then the value of `segmentId` will be `0`."}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon1","description":"Constructs a Polygon object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a Polygon with only x, y coordinates\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n rings: [\n [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832],\n [-97.06138,32.837]\n ],\n [\n [-97.06326,32.759],\n [-97.06298,32.755],\n [-97.06326,32.759]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with m values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasM: true,\n rings: [\n [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50],\n [-97.06138,32.837,0]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with z values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasZ: true,\n rings: [\n [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500],\n [-97.06138,32.837,1000]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a Polygon with z and m values\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n hasM: true,\n hasZ: true,\n rings: [\n [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50],\n [-97.06138,32.837,1000,0]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Polygon geometry object.\n\n - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of rings (or shapes) where each ring is an array of vertices.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a ring. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of rings (or shapes) that may contain curves.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes. Each item in the array can be either a vertex or a curve object.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a ring. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a ring. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon2","description":"Constructs a Polygon object from a dictionary using an array of Points as coordinates.","examples":"\n**Example**\n\nCreates a Polygon with only x, y coordinates\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n rings: [\n [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n ],\n [\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } })\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from a dictionary using an array of Points as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the Polygon geometry object.\n\n - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of rings (or shapes) where each ring is an array of point objects.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points representing a ring. All rings should be closed, meaning the first point of each ring should always be the same as the last point in the ring. Points should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes.\n - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of rings (or shapes) that may contain curves.\n\n - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a ring. All rings should be closed, meaning the first vertex of each ring should always be the same as the last vertex. Vertices should be defined in clockwise order. Rings with vertices defined in counter-clockwise order will result in polygon holes. Each item in the array can be either a vertex or a curve object.\n\n - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - An point representing a single vertex or coordinate in a ring.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a ring. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon3","description":"Constructs a Polygon object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polygon objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.","examples":"\n**Example**\n\n```arcade\n// Creates a Polygon object\nvar polygonJSON = '{\"rings\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832], [-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06153,32.749], [-97.06326,32.759]]],\"spatialReference\": { \"wkid\": 3857 }}';\nPolygon(polygonJSON);\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(jsonDefinition) -> Polygon","insertText":"Polygon(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polygon object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polygon objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON from which to construct the polygon geometry object.\n\n**Return value**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Polygon objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYGON)\n"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline1","description":"Constructs a Polyline object from a dictionary using only an array of values as coordinates.","examples":"\n**Examples**\n\nCreates a polyline with only x, y coordinates\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n paths: [\n [\n [-97.06138,32.837],\n [-97.06133,32.836],\n [-97.06124,32.834],\n [-97.06127,32.832]\n ],\n [\n [-97.06326,32.759],\n [-97.06298,32.755]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with m values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasM: true,\n paths: [\n [\n [-97.06138,32.837,0],\n [-97.06133,32.836,15],\n [-97.06124,32.834,30],\n [-97.06127,32.832,50]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with z values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasZ: true,\n paths: [\n [\n [-97.06138,32.837,1000],\n [-97.06133,32.836,1500],\n [-97.06124,32.834,1000],\n [-97.06127,32.832,500]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\nCreates a polyline with z and m values\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n hasM: true,\n hasZ: true,\n paths: [\n [\n [-97.06138,32.837,1000,0],\n [-97.06133,32.836,1500,15],\n [-97.06124,32.834,1000,30],\n [-97.06127,32.832,500,50]\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from a dictionary using only an array of values as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the polyline geometry object.\n\n - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of paths (or line segments) where each path is an array of vertices.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices in a line segment, or path.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a line segment. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of paths (or line segments) that may contain curves.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a path.\n\n - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers representing a single vertex or coordinate in a line segment. The first item in the array represents the x-coordinate. The second element represents the y-coordinate. The third element represents the m-coordinate if `hasM` is true and `hasZ` is false. Otherwise, the third element represents the z-coordinate. If `hasZ` and `hasM` are both true, then the third element represents the z-coordinate, and the fourth element represents the m-coordinate.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a path. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline2","description":"Constructs a Polyline object from a dictionary using an array of Points as coordinates.","examples":"\n**Example**\n\nCreates a polyline with only x, y coordinates\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n paths: [\n [\n Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } })\n ],\n [\n Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } })\n ]\n ],\n spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from a dictionary using an array of Points as coordinates.\n\n**Parameter**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The properties from which to construct the polyline geometry object.\n\n - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of paths (or line segments) where each path is an array of point objects.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points representing a line segment, or path.\n - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - _Since version 1.25 in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps._ An array of paths (or line segments) that may contain curves.\n\n - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - An array of vertices or curve objects in a path.\n\n - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - A point representing a vertex in a path.\n - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A curve object that represents a segment of a path. The curve object has the following properties:\n\n - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Defines an elliptic or circular arc. Circular arcs have four elements in the array; elliptic arcs must have 7 elements.\n - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - Represents a cubic Bézier curve. This is defined by an array of three arrays representing an end point and two control points.\n - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - The c property represents an open circular arc. This is defined as an array of two double-precision values representing the x and y coordinates of the center of the circle.\n - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has m-values.\n - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if the geometry has z-values.\n - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The spatial reference of the geometry.\n\n - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The Well-known ID of the geographic or projected coordinate system that defines the reference for which to draw the geometry.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline3","description":"Constructs a Polyline object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polyline objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.","examples":"\n**Example**\n\n```arcade\n// Creates a Polyline object\nvar polylineJSON = '{\"paths\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]], [[-97.06326,32.759],[-97.06298,32.755]]], \"spatialReference\": { \"wkid\": 3857 } }'\nPolyline(polylineJSON);\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(jsonDefinition) -> Polyline","insertText":"Polyline(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs a Polyline object from serialized JSON text. The JSON schema must follow the ArcGIS REST API JSON specification for Polyline objects. JSON text may contain curve objects in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps starting at version 1.25.\n\n**Parameter**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The JSON text from which to construct the polyline geometry object.\n\n**Return value**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**Additional resources**\n\n* [ArcGIS REST API JSON specification for Polyline objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYLINE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"relate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#relate","description":"Indicates if the given DE-9IM relation is `true` for the two geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the relation of the input geometries matches\n\n```arcade\nRelate($feature, geometry2, 'TTTFFTFFT')\n```\n\n","completion":{"label":"Relate","detail":"Relate(geometry1, geometry2, relation) -> Boolean","insertText":"Relate(${1:geometry1_}, ${2:geometry2_}, ${3:relation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if the given DE-9IM relation is `true` for the two geometries.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The first geometry for the relation.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The second geometry for the relation.\n- **relation**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix relation (encoded as a text value) to test against the relationship of the two geometries. This text contains the test result of each intersection represented in the DE-9IM matrix. Each result is one character of the text and may be represented as either a number (maximum dimension returned: 0,1,2), a Boolean value (T or F), or a mask character (for ignoring results: '\\*').\n\nExample: Each of the following DE-9IM text codes are valid for testing whether a polygon geometry completely contains a line geometry: TTTFFTFFT (Boolean), 'T\\*\\*\\*\\*\\*\\*FF\\*' (ignore irrelevant intersections), or '102FF\\*FF\\*' (dimension form). Each returns the same result.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"ringisclockwise","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#ringisclockwise","description":"Indicates whether the points in a polygon ring are ordered in a clockwise direction.","examples":"\n**Example**\n\n```arcade\n// $feature is a polygon feature\nvar polygonRings = Geometry($feature).rings;\nIIf(RingIsClockwise(polygonRings[0]), 'correct polygon', 'incorrect direction')\n```\n\n","completion":{"label":"RingIsClockwise","detail":"RingIsClockwise(points) -> Boolean","insertText":"RingIsClockwise(${1:points_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the points in a polygon ring are ordered in a clockwise direction.\n\n**Parameter**\n\n- **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> - An array of points in a polygon ring.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"rotate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#rotate","description":"Rotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the input feature rotated about the centroid by 90 degrees\n\n```arcade\nRotate($feature, 90)\n```\n\n","completion":{"label":"Rotate","detail":"Rotate(inputGeometry, angle, rotationOrigin?) -> Geometry","insertText":"Rotate(${1:inputGeometry_}, ${2:angle_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to rotate.\n- **angle**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The rotation angle in degrees.\n- **rotationOrigin** (_Optional_): [Point](https://developers.arcgis.com/arcade/guide/types/#point) - Point to rotate the geometry around. Defaults to the centroid of the geometry.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"setgeometry","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#setgeometry","description":"Sets or replaces a geometry on a user-defined Feature. Note that features referenced as global variables are immutable; their geometries cannot be changed.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nSets a new geometry on the feature\n\n```arcade\nvar pointFeature = Feature(Point( ... ), 'name', 'buffer centroid');\nvar mileBuffer = BufferGeodetic(Geometry(pointFeature), 1, 'mile');\nSetGeometry(pointFeature, mileBuffer);\n```\n\n","completion":{"label":"SetGeometry","detail":"SetGeometry(inputFeature, inputGeometry) -> Null","insertText":"SetGeometry(${1:inputFeature_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSets or replaces a geometry on a user-defined Feature. Note that features referenced as global variables are immutable; their geometries cannot be changed.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A feature whose geometry will be updated.\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - The geometry to set on the input feature.\n\n**Return value**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"simplify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#simplify","description":"Performs the simplify operation on the geometry. This alters the given geometry to make it topologically legal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns the simplified geometry of the feature\n\n```arcade\nSimplify($feature);\n```\n\n","completion":{"label":"Simplify","detail":"Simplify(inputGeometry) -> Geometry","insertText":"Simplify(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the simplify operation on the geometry. This alters the given geometry to make it topologically legal.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameter**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to be simplified.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"symmetricdifference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#symmetricdifference","description":"Performs the Symmetric difference operation on the two geometries. The symmetric difference includes the parts of both geometries that are not common with each other.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns a polygon representing areas where both inputs do not overlap\n\n```arcade\nvar geom2 = Polygon({ ... });\nSymmetricDifference($feature, geom2);\n```\n\n","completion":{"label":"SymmetricDifference","detail":"SymmetricDifference(leftGeometry, rightGeometry) -> Geometry","insertText":"SymmetricDifference(${1:leftGeometry_}, ${2:rightGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nPerforms the Symmetric difference operation on the two geometries. The symmetric difference includes the parts of both geometries that are not common with each other.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **leftGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry instance to compare to `rightGeometry` in the XOR operation.\n- **rightGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry instance to compare to `leftGeometry` in the XOR operation.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#touches","description":"Indicates if one geometry touches another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the geometries touch\n\n```arcade\nvar geom2 = Polygon({ ... });\nTouches($feature, geom2);\n```\n\n","completion":{"label":"Touches","detail":"Touches(geometry1, geometry2) -> Boolean","insertText":"Touches(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry touches another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `geometry2`.\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The geometry to test the 'touches' relationship with `geometry1`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union1","description":"Constructs the set-theoretic union of the geometries or features in an input array and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\n```arcade\nvar geom2 = Polygon({ ... });\nUnion([ $feature, geom2 ]);\n```\n\n","completion":{"label":"Union","detail":"Union(geometries) -> Geometry","insertText":"Union(${1:geometries_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic union of the geometries or features in an input array and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameter**\n\n- **geometries**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)> \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)> - An array of geometries or an array of features to union into a single geometry. This can be any number of geometries.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union2","description":"Constructs the set-theoretic union of a list of geometries and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**","examples":"\n**Example**\n\n```arcade\nvar geom2 = Polygon({ ... });\nvar geom3 = Polygon({ ... });\nvar geom4 = Polygon({ ... });\nUnion(Geometry($feature), geom2, geom3, geom4);\n```\n\n","completion":{"label":"Union","detail":"Union(geometry1, [geometry2, ..., geometryN]?) -> Geometry","insertText":"Union(${1:geometry1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstructs the set-theoretic union of a list of geometries and returns a single Geometry. All inputs must have the same geometry type and share the same spatial reference.\n\n**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.**\n\n**Parameters**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - A geometry to union into a single geometry with the other geometries.\n- **[geometry2, ..., geometryN]** (_Optional_): [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - An ongoing list of geometries or features to union into a single geometry. This can be any number of geometries.\n\n**Return value**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":-1}}],{"type":"function","name":"within","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#within","description":"Indicates if one geometry is within another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._","examples":"\n**Example**\n\nReturns true if the feature is within the given polygon\n\n```arcade\nvar outerGeom = Polygon({ ... });\nWithin($feature, outerGeom);\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerGeometry) -> Boolean","insertText":"Within(${1:innerGeometry_}, ${2:outerGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if one geometry is within another geometry.\n\n_Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry._\n\n**Parameters**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The base geometry that is tested for the 'within' relationship to `outerGeometry`.\n- **outerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - The comparison geometry that is tested for the 'contains' relationship to `innerGeometry`.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"knowledge-graph_functions","title":"Knowledge graph functions","items":[{"type":"function","name":"knowledgegraphbyportalitem","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#knowledgegraphbyportalitem","description":"Returns a knowledge graph from a portal item.","examples":"\n**Example**\n\nReturns the knowledge graph from the portal item.\n\n```arcade\nvar knowledgeGraph = KnowledgeGraphByPortalItem(\n Portal('https://www.example.com/arcgis'), // enterprise portal\n '7b1fb95ab77f40bf8aa09c8b59045449',\n);\n```\n\n","completion":{"label":"KnowledgeGraphByPortalItem","detail":"KnowledgeGraphByPortalItem(portalObject, itemId) -> KnowledgeGraph","insertText":"KnowledgeGraphByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a knowledge graph from a portal item.\n\n**Parameters**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - The Portal from which to query features.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The GUID of the portal item referencing a knowledge graph service. _This value must be a text literal._\n\n**Return value**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph)\n\n**Additional resources**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"querygraph","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#querygraph","description":"Queries a knowledge graph with an openCypher query and returns the set of entities and relationships in a graph, along with their properties.","examples":"\n**Examples**\n\nQueries the knowledge graph for information about the `Student` entities it contains.\n\n```arcade\nvar results = QueryGraph(\n knowledgeGraph,\n 'MATCH (p:Student)-[e:EnrolledAt]->(s:School)\n WHERE s.name = \"Eastside Elementary\"\n RETURN p,e,s.principal,s.numStaff\n LIMIT 1');\n\nreturn Text(results);\n```\n\nQueries the knowledge graph using bind parameters.\n\n```arcade\n// searches for entities with a `name` property that matches the given string in the query parameters\n// OR falls within the given geom bounding box\n// query returns both the supplier and the part that it buys\nvar query = `MATCH (s:Supplier)-[:buys_part]-(p:Part)\n WHERE s.name=$name OR esri.graph.ST_Intersects($geom, s.geometry)\n RETURN s,p`;\n \n var results = QueryGraph(\n $graph,\n query,\n {\n \"name\": \"Supplier 1\",\n \"geom\": Polygon({\n rings: [[\n [38,-78],\n [39,-79],\n [39,-76],\n [-38,-76],\n [-38,-78]\n ]]\n })\n }\n );\n```\n\n","completion":{"label":"QueryGraph","detail":"QueryGraph(graph, openCypherQuery, queryParameters?, includeProvenance?) -> Array","insertText":"QueryGraph(${1:graph_}, ${2:openCypherQuery_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nQueries a knowledge graph with an openCypher query and returns the set of entities and relationships in a graph, along with their properties.\n\n**Parameters**\n\n- **graph**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph) - The knowledge graph to query.\n- **openCypherQuery**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The openCypher query to be executed against the knowledge graph.\n- **queryParameters** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - A dictionary of named query parameters for the openCypher query. The parameter names or keys in the dictionary are case-sensitive. Parameters accepted depend on the external graph store and can be of type: `Array`, `Date`, `Dictionary`, `Geometry`, `Number`, `Text`\n- **includeProvenance** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - _Since 1.31_ Indicates whether to include provenance entities (metadata) in the query results. Default is `false`.\n\n**Return value**: Array\n\n**Additional resources**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":4}}]},{"id":"logical_functions","title":"Logical functions","items":[{"type":"function","name":"boolean","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#boolean","description":"Attempts to convert the given non-boolean value to a boolean value. For example a text value of 'true' would become `true`.","examples":"\n**Examples**\n\n```arcade\n// returns `true`\nBoolean('true')\n```\n\n```arcade\n// returns `false`. A value of 1 would return `true`\nBoolean(0)\n```\n\n```arcade\n// returns `false`\nBoolean('hello')\n```\n\n","completion":{"label":"Boolean","detail":"Boolean(value) -> Boolean","insertText":"Boolean(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nAttempts to convert the given non-boolean value to a boolean value. For example a text value of 'true' would become `true`.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A text or number value to be converted to a boolean.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"decode","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#decode","description":"Evaluates an expression to a value and compares the result value with the value of subsequent parameters. If the expression evaluates to a matching value, it returns the subsequent parameter value. If no matches are found, then the `default` value will be returned. This is similar to a switch/case statement.","examples":"\n**Example**\n\n```arcade\n// returns a meaningful value when a field contains coded values\nvar code = $feature.codedValue;\nvar decodedValue = Decode(code, 1, 'Residential', 2, 'Commercial', 3, 'Mixed', 'Other');\n```\n\n","completion":{"label":"Decode","detail":"Decode(expression, [compare1, return1, ..., compareN, returnN], default) -> Any","insertText":"Decode(${1:expression_}, ${2:[compare1, return1, ..., compareN, returnN]_}, ${3:default_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEvaluates an expression to a value and compares the result value with the value of subsequent parameters. If the expression evaluates to a matching value, it returns the subsequent parameter value. If no matches are found, then the `default` value will be returned. This is similar to a switch/case statement.\n\n**Parameters**\n\n- **expression**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - An Arcade expression that must evaluate to a value that can be compared with the provided case values.\n- **[compare1, return1, ..., compareN, returnN]**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A set of compare values and return value pairs.\n- **default**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A default value to return if none of the compare values match. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the matched return value. If no matches are found, then the `default` value is returned."}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#defaultvalue","description":"Returns a specified default value if an empty value is detected.","examples":"\n**Example**\n\n```arcade\n// If a feature has no value in the POP_2000 field\n// then 'no data' is returned\nDefaultValue($feature.POP_2000, 'no data')\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(value, defaultValue) -> Any","insertText":"DefaultValue(${1:value_}, ${2:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if an empty value is detected.\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The input value to compare against `null` or `''`. This may be a value of any type. However, if this value is an empty array, then the empty array will be returned.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Return this value if the provided `value` is empty. The data type of `defaultValue` must match the data type of `value`.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nIf `value` is empty, then the `defaultValue` is returned. Otherwise, the value of `value` is returned."}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#equals","description":"Indicates if two values are equal. Object types (i.e. Arrays, Features, Dictionaries, Geometry) will return true only if they are the same object.","examples":"\n**Example**\n\nCompares if two values are equal\n\n```arcade\nEquals(1, \"1\") // returns false\n\nvar testVal = \"test\";\nEquals(testVal, \"test\") // returns true\n\nvar array1 = Array(5);\nvar array2 = Array(5);\nEquals(array1, array2); // returns false\nEquals(array1, array1); // returns true\n```\n\n","completion":{"label":"Equals","detail":"Equals(value1, value2) -> Boolean","insertText":"Equals(${1:value1_}, ${2:value2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates if two values are equal. Object types (i.e. Arrays, Features, Dictionaries, Geometry) will return true only if they are the same object.\n\n**Parameters**\n\n- **value1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The first input value.\n- **value2**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The second input value.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"iif","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#iif","description":"Returns a given value if a conditional expression evaluates to `true`, and returns an alternate value if that condition evaluates to `false`.","examples":"\n**Example**\n\n```arcade\n// returns 'below' if the value is less than 1,000,000.\n// if the value is more than 1,000,000, then returns 'above'\nvar population = $feature.POP_2007;\nIIf(population < 1000000, 'below', 'above');\n```\n\n","completion":{"label":"IIf","detail":"IIf(condition, trueValue, falseValue) -> Any","insertText":"IIf(${1:condition_}, ${2:trueValue_}, ${3:falseValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a given value if a conditional expression evaluates to `true`, and returns an alternate value if that condition evaluates to `false`.\n\n**Parameters**\n\n- **condition**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - A logical expression that must evaluate to `true` or `false`.\n- **trueValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to return if the `condition` evaluates to `true`. This may be a value of any type.\n- **falseValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to return if the `condition` evaluates to `false`. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nIf `condition` is `true`, then the `trueValue` is returned. Otherwise, the value of `falseValue` is returned."}},"parametersInfo":{"min":3,"max":3}},[{"type":"function","name":"isempty","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty1","description":"Returns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` - `\"\"` (empty text value) \nReturns `false` for all other cases, including empty arrays and dictionaries.","examples":"\n**Examples**\n\n```arcade\n// Returns true\nIsEmpty(null)\n```\n\n```arcade\n// Returns false\nIsEmpty('hello world')\n```\n\n```arcade\n// Returns false\nIsEmpty([])\n```\n\n","completion":{"label":"IsEmpty","detail":"IsEmpty(value) -> Boolean","insertText":"IsEmpty(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` - `\"\"` (empty text value) \nReturns `false` for all other cases, including empty arrays and dictionaries.\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check for emptiness (i.e. `null`, `''`).\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isempty","bundle":"core","sinceVersion":"1.34","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty2","description":"Returns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` \n - `\"\"` (empty text value) \n\n\nThe following scenarios return `true` only if `checkContainers` is `true`: \n - array with no items \n - dictionary with no keys \n - Feature with no geometry or attributes \n - FeatureSet with no features \n - any other data type without keys (e.g. Voxel, etc)","examples":"\n**Examples**\n\n```arcade\n// Returns true since the array is empty\nIsEmpty([], true)\n```\n\n```arcade\n// Returns false since the array has items\nIsEmpty([1,null,3], true)\n```\n\n```arcade\n// Returns true if the layer has no features\nIsEmpty($layer, true)\n```\n\n```arcade\n// Returns true since the FeatureSet has no features\nvar fs = FeatureSet('{\"fields\":[{\"alias\":\"ELEV_m\",\"name\":\"ELEV_m\",\"type\":\"esriFieldTypeInteger\"}],\"spatialReference\":{\"wkid\":4326},\"geometryType\":\"esriGeometryPoint\",\"features\":[]}')\nIsEmpty(fs, true)\n```\n\n```arcade\n// Returns true since the dictionary is empty\nvar dict = {}\nIsEmpty(dict, true)\n```\n\n```arcade\n// Returns false since the dictionary has a key\nvar dict = {a: \"\"}\nIsEmpty(dict, true)\n```\n\n","completion":{"label":"IsEmpty","detail":"IsEmpty(value, checkContainers) -> Boolean","insertText":"IsEmpty(${1:value_}, ${2:checkContainers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.34](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns `true` if the input value is considered empty. The following input scenarios will return `true`: \n - `null` \n - `\"\"` (empty text value) \n\n\nThe following scenarios return `true` only if `checkContainers` is `true`: \n - array with no items \n - dictionary with no keys \n - Feature with no geometry or attributes \n - FeatureSet with no features \n - any other data type without keys (e.g. Voxel, etc)\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check for emptiness (i.e. `null`, `''`, or containers with no items).\n- **checkContainers**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Set to `true` to check input data types that may contain other values, such as whether an array or feature set has items, a dictionary or feature has keys, etc.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"isnan","bundle":"core","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isnan","description":"Indicates whether the input value is not a number (NaN). A number is considered NaN in one of the following scenarios: - `0/0` - `Infinity / Infinity` - `Infinity * 0` - Any operation in which NaN is an operand - Casting a non-numeric text or `undefined` to a number","examples":"\n**Examples**\n\n```arcade\n// Returns true\nIsNan(Infinity / Infinity)\n```\n\n```arcade\n// Returns false\nIsNan('4')\n```\n\n","completion":{"label":"IsNan","detail":"IsNan(value) -> Boolean","insertText":"IsNan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether the input value is not a number (NaN). A number is considered NaN in one of the following scenarios: - `0/0` - `Infinity / Infinity` - `Infinity * 0` - Any operation in which NaN is an operand - Casting a non-numeric text or `undefined` to a number\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to check if it is NaN.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"typeof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#typeof","description":"Returns the type of the input value. Will return one of the following types: `Array`, `Date`, `String`, `Boolean`, `Number`, `Dictionary`, `Feature`, `FeatureSet`, `Point`, `Polygon`, `Polyline`, `Multipoint`, `Extent`, `Function`, `Pixel`, `Voxel`, `Unrecognized Type`.","examples":"\n**Examples**\n\nprints 'Boolean'\n\n```arcade\nTypeOf(true)\n```\n\nprints 'Date'\n\n```arcade\nTypeOf(Now())\n```\n\n","completion":{"label":"TypeOf","detail":"TypeOf(value) -> Text","insertText":"TypeOf(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the type of the input value. Will return one of the following types: `Array`, `Date`, `String`, `Boolean`, `Number`, `Dictionary`, `Feature`, `FeatureSet`, `Point`, `Polygon`, `Polyline`, `Multipoint`, `Extent`, `Function`, `Pixel`, `Voxel`, `Unrecognized Type`.\n\n**Parameter**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The input value, variable, or feature attribute.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"when","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#when","description":"Evaluates a series of conditional expressions until one evaluates to `true`.","examples":"\n**Example**\n\nReclassify a numeric field value to a generic ranking (text). \nIf all expressions are `false`, then 'n/a' is returned\n\n```arcade\nvar density = $feature.densityField;\nvar ranking = When(density < 50, 'low', density >=50 && density < 100, 'medium', density >= 100, 'high', 'n/a');\n```\n\n","completion":{"label":"When","detail":"When(expression1, result1, [expression2, result2, ..., expressionN, resultN]?, defaultValue) -> Any","insertText":"When(${1:expression1_}, ${2:result1_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEvaluates a series of conditional expressions until one evaluates to `true`.\n\n**Parameters**\n\n- **expression1**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - a conditional expressions, if it evaluates to `true` then `result1` will be returned.\n- **result1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The result returned if the `expression1` evaluates to `true`. This may be a value of any type.\n- **[expression2, result2, ..., expressionN, resultN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A series of conditional expressions and return values if the given expression evaluates to `true`. This may be a value of any type.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - Returns this value if all expressions evaluate to `false`. This may be a value of any type.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":3,"max":-1}}]},{"id":"math_functions","title":"Math functions","items":[{"type":"function","name":"abs","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#abs","description":"Returns the absolute value of a number. If the input is `null`, then it returns 0.","examples":"\n**Example**\n\nprints 3\n\n```arcade\nAbs(-3)\n```\n\n","completion":{"label":"Abs","detail":"Abs(value) -> Number","insertText":"Abs(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the absolute value of a number. If the input is `null`, then it returns 0.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"acos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#acos","description":"Returns the arccosine of the input value in radians, in the range of zero to PI. If the input value is outside the appropriate range of +/- 1, then NaN is returned.","examples":"\n**Example**\n\nprints 1.266104\n\n```arcade\nAcos(0.3)\n```\n\n","completion":{"label":"Acos","detail":"Acos(value) -> Number","insertText":"Acos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arccosine of the input value in radians, in the range of zero to PI. If the input value is outside the appropriate range of +/- 1, then NaN is returned.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number between -1 and 1 on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"asin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#asin","description":"Returns the arcsine of the input value in radians, in the range of -PI/2 and PI/2. If the input value is outside the appropriate range of +/- 1, then NaN is returned.","examples":"\n**Example**\n\nprints 0.304693\n\n```arcade\nAsin(0.3)\n```\n\n","completion":{"label":"Asin","detail":"Asin(value) -> Number","insertText":"Asin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arcsine of the input value in radians, in the range of -PI/2 and PI/2. If the input value is outside the appropriate range of +/- 1, then NaN is returned.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number between -1 and 1 on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan","description":"Returns the arctangent of the input value in radians, in the range of -PI/2 and PI/2.","examples":"\n**Example**\n\nprints 0.785398\n\n```arcade\nAtan(1)\n```\n\n","completion":{"label":"Atan","detail":"Atan(value) -> Number","insertText":"Atan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arctangent of the input value in radians, in the range of -PI/2 and PI/2.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan2","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan2","description":"Returns the arctangent of the quotient of the input values in radians, in the range of -PI and zero or zero and PI depending on the sign of arguments.","examples":"\n**Example**\n\nprints -2.356194\n\n```arcade\nAtan2(-1, -1)\n```\n\n","completion":{"label":"Atan2","detail":"Atan2(y, x) -> Number","insertText":"Atan2(${1:y_}, ${2:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the arctangent of the quotient of the input values in radians, in the range of -PI and zero or zero and PI depending on the sign of arguments.\n\n**Parameters**\n\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the y-coordinate.\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing the x-coordinate.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average1","description":"Returns the average of an array of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nvar values = [0,5,10]\nAverage(values)\n```\n\n","completion":{"label":"Average","detail":"Average(numbers) -> Number","insertText":"Average(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average2","description":"Returns the average of a list of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nAverage(0,5,10)\n```\n\n","completion":{"label":"Average","detail":"Average([number1, ..., numberN]?) -> Number","insertText":"Average($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the average of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"ceil","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#ceil","description":"Returns the input value rounded upwards to the given number of decimal places.","examples":"\n**Example**\n\nprints 2135.1\n\n```arcade\nCeil(2135.0905, 2)\n```\n\n","completion":{"label":"Ceil","detail":"Ceil(value, numPlaces?) -> Number","insertText":"Ceil(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value rounded upwards to the given number of decimal places.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number to round upward.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the `value` to. Default is 0. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"constrain","bundle":"core","sinceVersion":"1.2","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#constrain","description":"Constrains the given input `value` to minimum and maximum bounds. For example, if the input value is `10`, the lower bound is `50`, and the upper bound is `100`, then `50` is returned.","examples":"\n**Examples**\n\nreturns 5\n\n```arcade\nConstrain(5, 0, 10)\n```\n\nreturns 0\n\n```arcade\nConstrain(-3, 0, 10)\n```\n\nreturns 10\n\n```arcade\nConstrain(553, 0, 10)\n```\n\n","completion":{"label":"Constrain","detail":"Constrain(value, lowerBound, upperBound) -> Number","insertText":"Constrain(${1:value_}, ${2:lowerBound_}, ${3:upperBound_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.2](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConstrains the given input `value` to minimum and maximum bounds. For example, if the input value is `10`, the lower bound is `50`, and the upper bound is `100`, then `50` is returned.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to constrain to the given `min` and `max` bounds.\n- **lowerBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The lower bound by which to constrain the input `value`. If the given value is less than the `min`, then `min` is returned.\n- **upperBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The upper bound by which to constrain the input `value`. If the given value is greater than the `max`, then `max` is returned.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"cos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#cos","description":"Returns the cosine of the input value in radians.","examples":"\n**Example**\n\nprints 0.540302\n\n```arcade\nCos(1)\n```\n\n","completion":{"label":"Cos","detail":"Cos(value) -> Number","insertText":"Cos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the cosine of the input value in radians.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number in radians on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"exp","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#exp","description":"Returns the value of e to the power of x, where e is the base of the natural logarithm `2.718281828`.","examples":"\n**Example**\n\nprints 7.389056\n\n```arcade\nExp(2)\n```\n\n","completion":{"label":"Exp","detail":"Exp(x) -> Number","insertText":"Exp(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the value of e to the power of x, where e is the base of the natural logarithm `2.718281828`.\n\n**Parameter**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The power, or number of times to multiply `e` to itself.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"floor","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#floor","description":"Returns the input value rounded downward to the given number of decimal places.","examples":"\n**Example**\n\nprints 2316.25\n\n```arcade\nFloor(2316.2562, 2)\n```\n\n","completion":{"label":"Floor","detail":"Floor(value, numPlaces?) -> Number","insertText":"Floor(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value rounded downward to the given number of decimal places.\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number to round downward.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the number. Default is 0. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"hash","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#hash","description":"Generates a hash code value for the given variable.","examples":"\n**Example**\n\nReturns `1649420691`.\n\n```arcade\nHash('text value')\n```\n\n","completion":{"label":"Hash","detail":"Hash(value) -> Number","insertText":"Hash(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGenerates a hash code value for the given variable.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - The variable to be hashed. DateOnly and Time values are supported starting at version 1.24.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"log","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#log","description":"Returns the natural logarithm (base e) of x.","examples":"\n**Example**\n\nprints 2.302585\n\n```arcade\nLog(10)\n```\n\n","completion":{"label":"Log","detail":"Log(x) -> Number","insertText":"Log(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the natural logarithm (base e) of x.\n\n**Parameter**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max1","description":"Returns the largest value from an array of numbers.","examples":"\n**Example**\n\nprints 89\n\n```arcade\nMax([23,56,89])\n```\n\n","completion":{"label":"Max","detail":"Max(numbers) -> Number","insertText":"Max(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the largest value from an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max2","description":"Returns the largest value from a list of numbers.","examples":"\n**Example**\n\nprints 120\n\n```arcade\nMax(23,5,120,43,9)\n```\n\n","completion":{"label":"Max","detail":"Max([number1, ..., numberN]?) -> Number","insertText":"Max($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the largest value from a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean1","description":"Returns the mean value of an array of numbers.","examples":"\n**Example**\n\n```arcade\nvar values = [1,2,3,4,5,6,7,8,9];\nMean(values);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean(numbers) -> Number","insertText":"Mean(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers from which to calculate the mean.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean2","description":"Returns the mean value of a list of numbers.","examples":"\n**Example**\n\n```arcade\nMean(1,2,3,4,5,6,7,8,9);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean([number1, ..., numberN]?) -> Number","insertText":"Mean($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the mean value of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers from which to calculate the mean.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min1","description":"Returns the lowest value in a given array of numbers.","examples":"\n**Example**\n\nprints 23\n\n```arcade\nMin([23,56,89])\n```\n\n","completion":{"label":"Min","detail":"Min(numbers) -> Number","insertText":"Min(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value in a given array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min2","description":"Returns the lowest value in a given list of numbers.","examples":"\n**Example**\n\nprints 5\n\n```arcade\nMin(23,5,120,43,9)\n```\n\n","completion":{"label":"Min","detail":"Min([number1, ..., numberN]?) -> Number","insertText":"Min($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the lowest value in a given list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"number","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#number","description":"Converts the input value to a number. Date values will be converted to the number of milliseconds since Jan. 1, 1970 (i.e. the Unix epoch).","examples":"\n**Examples**\n\nParses a number using a grouping separator appropriate for the local in which the expression is executed\n\n```arcade\nNumber('1,365', ',###') // returns 1365\n```\n\nRemove text characters from number.\n\n```arcade\nNumber('abc10def', 'abc##def') // return 10\n```\n\nSpecify minimum digits past 0 as two and maximum digits past 0 as 4.\n\n```arcade\nNumber('10.456','00.00##') // returns 10.456\n```\n\nSpecify minimum digits past 0 as two and maximum digits past 0 as 4. The left and right side of the function must match or NaN is returned.\n\n```arcade\nNumber('10.4','00.00##') // returns NaN\n```\n\nIndicate the size of the repeated group and the final group size of the input value.\n\n```arcade\nNumber('12,12,456', ',##,###') // returns 1212456\n```\n\nIf there is a negative subpattern, it serves only to specify the negative prefix and suffix.\n\n```arcade\nNumber('-12,23,345', ',##,###;-,##,###') // returns -1223345\n```\n\nDivide by 100. Maximum of three decimal places can be input.\n\n```arcade\nNumber('99.99%', '#.##%') // 0.9999\n```\n\nReturns the number of milliseconds since Jan. 1, 1970.\n\n```arcade\nNumber(Date(1996,11,10)) // returns 850204800000\n```\n\n","completion":{"label":"Number","detail":"Number(value, pattern?) -> Number","insertText":"Number(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts the input value to a number. Date values will be converted to the number of milliseconds since Jan. 1, 1970 (i.e. the Unix epoch).\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - The value to convert to a number.\n- **pattern** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The format pattern text used to parse numbers formatted in a localized context from a text value to a number. The following are special characters used to define the pattern:\n\n - 0: Mandatory digits \n - #: Optional digits \n - %: Divide by 100 \n\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"pow","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#pow","description":"Returns the value of x to the power of y.","examples":"\n**Example**\n\nprints 9\n\n```arcade\nPow(3, 2)\n```\n\n","completion":{"label":"Pow","detail":"Pow(x, y) -> Number","insertText":"Pow(${1:x_}, ${2:y_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the value of x to the power of y.\n\n**Parameters**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The base value.\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The exponent. This indicates the number of times to multiply `x` by itself.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"random","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#random","description":"Returns a random number between 0 and 1.","examples":"\n**Example**\n\n```arcade\nRandom()\n```\n\n","completion":{"label":"Random","detail":"Random() -> Number","insertText":"Random($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a random number between 0 and 1.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"round","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#round","description":"Returns the input value, rounded to the given number of decimal places. \n_Note: If you're looking to format a value for display in a label or popup, use the `Text()` function._","examples":"\n**Example**\n\nprints 2316.26\n\n```arcade\nRound(2316.2562, 2)\n```\n\n","completion":{"label":"Round","detail":"Round(value, numPlaces?) -> Number","insertText":"Round(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the input value, rounded to the given number of decimal places. \n_Note: If you're looking to format a value for display in a label or popup, use the `Text()` function._\n\n**Parameters**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number to round.\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of decimal places to round the number to. Default is `0`. Trailing zeros will be truncated.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**Additional resources**\n\n* [Text()](https://developers.arcgis.com/arcade/function-reference/text_functions/#text)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"sin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sin","description":"Returns the sine of the input value.","examples":"\n**Example**\n\nprints 0.841741\n\n```arcade\nSin(1)\n```\n\n","completion":{"label":"Sin","detail":"Sin(value) -> Number","insertText":"Sin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sine of the input value.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number in radians on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sqrt","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sqrt","description":"Returns the square root of a number.","examples":"\n**Example**\n\nprints 3\n\n```arcade\nSqrt(9)\n```\n\n","completion":{"label":"Sqrt","detail":"Sqrt(value) -> Number","insertText":"Sqrt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the square root of a number.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to calculate the square root.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev1","description":"Returns the population standard deviation from an array of numbers.","examples":"\n**Example**\n\nprints 27.5\n\n```arcade\nStdev([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(numbers) -> Number","insertText":"Stdev(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the population standard deviation from an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev2","description":"Returns the population standard deviation from a list of numbers.","examples":"\n**Example**\n\nprints 27.5\n\n```arcade\nStdev(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Stdev","detail":"Stdev([number1, ..., numberN]?) -> Number","insertText":"Stdev($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the population standard deviation from a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum1","description":"Returns the sum of an array of numbers.","examples":"\n**Example**\n\nprints 303\n\n```arcade\nSum([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Sum","detail":"Sum(numbers) -> Number","insertText":"Sum(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum2","description":"Returns the sum of a list of numbers.","examples":"\n**Example**\n\nprints 303\n\n```arcade\nSum(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Sum","detail":"Sum([number1, ..., numberN]?) -> Number","insertText":"Sum($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the sum of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"tan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#tan","description":"Returns the tangent of an angle in radians.","examples":"\n**Example**\n\nprints 0.57389\n\n```arcade\nTan(0.521)\n```\n\n","completion":{"label":"Tan","detail":"Tan(value) -> Number","insertText":"Tan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the tangent of an angle in radians.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number on which to calculate the tangent.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance1","description":"Returns the variance (population variance) of an array of numbers.","examples":"\n**Example**\n\nprints 756.25\n\n```arcade\nVariance([12,23,45,56,78,89])\n```\n\n","completion":{"label":"Variance","detail":"Variance(numbers) -> Number","insertText":"Variance(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance (population variance) of an array of numbers.\n\n**Parameter**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)> - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance2","description":"Returns the variance (population variance) of a list of numbers.","examples":"\n**Example**\n\nprints 756.25\n\n```arcade\nVariance(12,23,45,56,78,89)\n```\n\n","completion":{"label":"Variance","detail":"Variance([number1, ..., numberN]?) -> Number","insertText":"Variance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the variance (population variance) of a list of numbers.\n\n**Parameter**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An array of numbers on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}]]},{"id":"pixel_functions","title":"Pixel functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#defaultvalue","description":"Returns a specified default value if a field name in a given pixel does not exist or the value of the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"No data\" if pixel attribute does not exist or is empty\n\n```arcade\nDefaultValue($pixel, \"Raster.sea_temp\", \"No data\")\n// Returns the sea_temp value if available\n// or 'No data' if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputPixel, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputPixel_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a given pixel does not exist or the value of the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The input pixel to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check for a value.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value of the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#haskey","description":"Indicates whether a pixel contains the given key or attribute.","examples":"\n**Example**\n\nReturns `true` if the pixel has an attribute named `elev`\n\n```arcade\nHasKey($pixel, 'elev');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputPixel, key) -> Boolean","insertText":"HasKey(${1:inputPixel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a pixel contains the given key or attribute.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to check for an attribute name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The attribute name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.35","link":"https://developers.arcgis.com/arcade/function-reference/pixel_functions/#hasvalue","description":"Indicates whether a pixel has a given attribute and if that attribute has a value.","examples":"\n**Example**\n\nReturn false if pixel attribute does not exist or is empty\n\n```arcade\niif(HasValue($pixel, \"Raster.ServicePixelValue\"), ($pixel[\"Raster.ServicePixelValue\"][0] - 32) * 5/9, \"No Data\")\n// Returns the temp in celsius if the Raster.ServicePixelValue is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputPixel, key) -> Boolean","insertText":"HasValue(${1:inputPixel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.35](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a pixel has a given attribute and if that attribute has a value.\n\n**Parameters**\n\n- **inputPixel**: [Pixel](https://developers.arcgis.com/arcade/guide/types/#pixel) - The pixel to check.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The attribute name to check for a value.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"portal_functions","title":"Portal functions","items":[{"type":"function","name":"featuresetbyportalitem","bundle":"portal-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem","description":"Creates a FeatureSet from a Feature Layer in a portal item from a given Portal. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.","examples":"\n**Example**\n\nReturns the number of features in the layer from a different portal than the feature in the map.\n\n```arcade\nvar features = FeatureSetByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n 0,\n ['Name', 'Count'],\n false\n);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByPortalItem","detail":"FeatureSetByPortalItem(portalObject, itemId, layerId?, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a FeatureSet from a Feature Layer in a portal item from a given Portal. Limiting the number of fields in the FeatureSet and excluding the geometry can improve the performance of the script.\n\n**Parameters**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - The Portal from which to query features from a given portal item ID.\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The GUID of the portal item referencing a feature layer or feature service. _Please note that this value must be a text literal._\n- **layerId** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The ID of the layer in the feature service. This layer must be created from a feature service; feature collections are not supported.\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - The fields to include in the FeatureSet. By default, all fields are included. To request all fields in the layer, set this value to `['*']`. Limiting the number of fields improves the performance of the script.\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to include the geometry in the features. For performance reasons, you should only request the geometry if necessary, such as for use in geometry functions.\n\n**Return value**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":5}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser1","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns username for the currently logged in user of the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nvar userInfo = GetUser();\nif(HasValue(userInfo, \"username\")){\n return userInfo.username;\n}\n```\n\nReturns the dictionary for the user currently logged in based on the workspace connection from the given portal.\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'))\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, username?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - A Portal from which to return the current user. If no portal is specified, then user information from the active portal is returned.\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the user you want to return. Only limited information will be returned based on your permissions when making the request.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user."}},"parametersInfo":{"min":0,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser2","description":"Returns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.","examples":"\n**Examples**\n\nReturns user information for the active portal. If no user is associated with the portal, this will return `null`.\n\n```arcade\nGetUser()\n```\n\nReturns information about the user currently logged in based on the portal with user extensions.\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'), true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, extensions?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the current user from the workspace. For data from a service, either the Portal user or Server user is returned. For data from a database connection, the database user is returned. When no user is associated with the workspace, such as a file geodatabase, a `null` value will be returned.\n\n**Parameters**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - A Portal from which to return the current user. If no portal is specified, then user information from the active portal is returned.\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Determines if the `userLicenseTypeExtensions` will be returned in the dictionary.\n\n**Return value**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \nReturns a dictionary described by the properties below. In an offline workflow, only the username will be returned.\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user id of the returned user.\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The username of the returned user.\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The user's first and last name.\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The email address associated with the user's account.\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of groups that the user belongs to.\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The role that the user plays within their organization (e.g. Administrator, Publisher, User, Viewer, or Custom).\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of privileges that the user has within their organization (e.g. edit, view, etc).\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of the license type extensions associated with the user's account (e.g. \"Utility Network\", \"Parcel Fabric\", etc). The `extensions` parameter must be set to `true` in order for this to be returned."}},"parametersInfo":{"min":0,"max":2}}],[{"type":"function","name":"portal","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#portal1","description":"Creates a reference to an ArcGIS Portal.","examples":"\n**Examples**\n\nQuery features from a portal item in ArcGIS Online\n\n```arcade\nvar arcgisPortal = Portal('https://www.arcgis.com');\nvar features = FeatureSetByPortalItem(arcgisPortal, '7b1fb95ab77f40bf8aa09c8b59045449', 0, ['Name', 'Count'], false);\n```\n\nEnterprise Portal\n\n```arcade\nPortal('https://www.example.com/arcgis')\n```\n\n","completion":{"label":"Portal","detail":"Portal(url) -> Portal","insertText":"Portal(${1:url_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a reference to an ArcGIS Portal.\n\n**Parameter**\n\n- **url**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The url of the portal.\n\n**Return value**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"portal","bundle":"data-access","sinceVersion":"1.36","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#portal2","description":"Creates a reference to the active portal of the expression's execution context. Returns null if no active portal is available.","examples":"\n**Example**\n\nReturns the url of the active portal of the environment where the expression executes.\n\n```arcade\nPortal().url\n```\n\n","completion":{"label":"Portal","detail":"Portal() -> Portal","insertText":"Portal($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.36](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCreates a reference to the active portal of the expression's execution context. Returns null if no active portal is available.\n\n**Return value**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal)"}},"parametersInfo":{"min":0,"max":0}}]]},{"id":"text_functions","title":"Text functions","items":[{"type":"function","name":"concatenate","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#concatenate","description":"Concatenates values together and returns a text value.","examples":"\n**Example**\n\nprints 'red/blue/green'\n\n```arcade\nConcatenate(['red', 'blue', 'green'], '/')\n```\n\n","completion":{"label":"Concatenate","detail":"Concatenate(values?, separator?, format?) -> Text","insertText":"Concatenate($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConcatenates values together and returns a text value.\n\n**Parameters**\n\n- **values** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)> - An array of text values to concatenate.\n- **separator** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Separator to use for concatenation if `values` parameter is an array. Or text to concatenate, if a single value is provided for the first parameter. If not provided will be empty.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Special formatting characters for dates or numbers. This parameter is available in Arcade version 1.3 and later. \nPossible values: \n - `0`: Digit \n - `#`: Digit, omitting leading/trailing zeros \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `SSS`: Milliseconds, padded (000 - 999) \n - `A`: AM/PM \n - `Z`: Time zone offset in narrow hours +/- UTC (e.g. `-7` or `+11`) \n - `ZZ`: Time zone offset in hours +/- UTC (e.g. `-07:00` or `+11:00`) \n - `ZZZ`: Time zone offset in compact hours +/- UTC (e.g. `-0700` or `+1100`) \n - `ZZZZ`: Abbreviated named time zone (e.g. `EST`) \n - `ZZZZZ`: Named time zone (e.g. `Eastern Standard Time`) \n\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":3}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#count","description":"Returns the number of characters in a text value.","examples":"\n**Example**\n\nReturns 13\n\n```arcade\nCount('Graham County')\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the number of characters in a text value.\n\n**Parameter**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value on which to perform the operation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"find","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#find","description":"Finds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of `-1` indicates no results were found.","examples":"\n**Example**\n\nprints 6\n\n```arcade\nFind('380', 'Esri, 380 New York Street', 0)\n```\n\n","completion":{"label":"Find","detail":"Find(searchText, targetText, startPosition?) -> Number","insertText":"Find(${1:searchText_}, ${2:targetText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nFinds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of `-1` indicates no results were found.\n\n**Parameters**\n\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search for.\n- **targetText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search.\n- **startPosition** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The zero-based index of the character in the text to search from.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"fromcharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcharcode","description":"Returns a text value created from a sequence of UTF-16 character codes.","examples":"\n**Examples**\n\nThe following example returns 'XYZ'\n\n```arcade\nFromCharCode(88,89,90)\n// returns 'XYZ'\n```\n\nThe following example returns '🌉'\n\n```arcade\nFromCharCode(55356, 57097)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCharCode","detail":"FromCharCode(charCode1, [charCode2, ..., charCodeN]?) -> Text","insertText":"FromCharCode(${1:charCode1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a text value created from a sequence of UTF-16 character codes.\n\n**Parameters**\n\n- **charCode1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A number representing UTF-16 code units. Each unit has a range of 0-65535.\n- **[charCode2, ..., charCodeN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A sequence of numbers representing UTF-16 code units. Each unit has a range of 0-65535.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"fromcodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcodepoint","description":"Returns a text value created from a sequence of UTF-32 code points.","examples":"\n**Examples**\n\nThe following example returns 'XYZ'\n\n```arcade\nFromCodePoint(88,89,90)\n// returns 'XYZ'\n```\n\nThe following example returns '🌉'\n\n```arcade\nFromCodePoint(127753)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCodePoint","detail":"FromCodePoint(codePoint1, [codePoint2, ..., codePoint1N]?) -> Text","insertText":"FromCodePoint(${1:codePoint1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a text value created from a sequence of UTF-32 code points.\n\n**Parameters**\n\n- **codePoint1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A code point.\n- **[codePoint2, ..., codePoint1N]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - A list of code points\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"guid","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#guid","description":"Returns a random GUID as a text value.","examples":"\n**Examples**\n\nReturns a value similar to `{db894515-ed21-4df1-af67-36232256f59a}`\n\n```arcade\nGuid()\n```\n\nReturns a value similar to `d00cf4dffb184caeb8ed105b2228c247`\n\n```arcade\nGuid('digits')\n```\n\n","completion":{"label":"Guid","detail":"Guid(guidFormat?) -> Text","insertText":"Guid($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a random GUID as a text value.\n\n**Parameter**\n\n- **guidFormat** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - An named format for the GUID. The default value is `digits-hyphen-braces`. \nPossible Values: `digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"left","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#left","description":"Returns the specified number of characters from the beginning of a text value.","examples":"\n**Example**\n\nprints 'the'\n\n```arcade\nLeft('the quick brown fox', 3)\n```\n\n","completion":{"label":"Left","detail":"Left(value, charCount) -> Text","insertText":"Left(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the specified number of characters from the beginning of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value from which to get characters.\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to get from the beginning of the text.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"lower","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#lower","description":"Makes a text value lower case.","examples":"\n**Example**\n\nprints 'hello'\n\n```arcade\nLower('HELLO')\n```\n\n","completion":{"label":"Lower","detail":"Lower(inputText) -> Text","insertText":"Lower(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nMakes a text value lower case.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to be made lowercase.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mid","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#mid","description":"Gets a number of characters from the middle of a text value.","examples":"\n**Example**\n\nprints 'quick'\n\n```arcade\nMid('the quick brown fox', 4, 5)\n```\n\n","completion":{"label":"Mid","detail":"Mid(value, startPosition, charCount?) -> Text","insertText":"Mid(${1:value_}, ${2:startPosition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nGets a number of characters from the middle of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The value from which to get characters. If the value is not of type Text, the value is first converted to Text.\n- **startPosition**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The starting position from which to get the text. 0 is the first position.\n- **charCount** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to extract. If omitted, extracts characters to the end of the Text\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"proper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#proper","description":"Converts a text value to title case. By default, the beginning of every word is capitalized. The option `firstword` will capitalize only the first word.","examples":"\n**Example**\n\nprints 'The Quick Brown Fox'\n\n```arcade\nProper('the quick brown fox', 'everyword')\n```\n\n","completion":{"label":"Proper","detail":"Proper(inputText, applyToText?) -> Text","insertText":"Proper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts a text value to title case. By default, the beginning of every word is capitalized. The option `firstword` will capitalize only the first word.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to convert to title case.\n- **applyToText** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A text value specifying the type of capitalization to be performed. By default every word is capitalized. This parameter accepts one of two values: `everyword` or `firstword`.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"replace","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#replace","description":"Replaces characters within a text value. Defaults to replacing all occurrences.","examples":"\n**Example**\n\nprints 'the quick red fox'\n\n```arcade\nReplace('the quick brown fox', 'brown', 'red')\n```\n\n","completion":{"label":"Replace","detail":"Replace(value, searchText, replacementText, allOccurrences?) -> Text","insertText":"Replace(${1:value_}, ${2:searchText_}, ${3:replacementText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReplaces characters within a text value. Defaults to replacing all occurrences.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text in which to make replacements.\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to search for.\n- **replacementText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The replacement text.\n- **allOccurrences** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates if all occurrences of the `searchText` should be replaced in the text. Defaults to `true`.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"right","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#right","description":"Returns the specified number of characters from the end of a text value.","examples":"\n**Example**\n\nprints 'fox'\n\n```arcade\nRight('the quick brown fox', 3)\n```\n\n","completion":{"label":"Right","detail":"Right(value, charCount) -> Text","insertText":"Right(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the specified number of characters from the end of a text value.\n\n**Parameters**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get characters.\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of characters to get from the end of the text value.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"split","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#split","description":"Splits a text value into an array.","examples":"\n**Examples**\n\nreturns '[red,green]'\n\n```arcade\nSplit('red,green,blue,orange', ',', 2)\n```\n\nSplits the paragraph at each space an unlimited number of times. Returns an array of the words in the paragraph.\n\n```arcade\nSplit(paragraph, ' ', -1, true)\n```\n\n","completion":{"label":"Split","detail":"Split(inputText, separatorText, limit?, removeEmpty?) -> Array<Text>","insertText":"Split(${1:inputText_}, ${2:separatorText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nSplits a text value into an array.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text value to be split.\n- **separatorText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The separator used to split the text.\n- **limit** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An integer that specifies the number of splits. The default is `-1`, which indicates an unlimited number of splits.\n- **removeEmpty** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - Indicates whether to remove empty values. By default this is `false`.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Text](https://developers.arcgis.com/arcade/guide/types/#text)>"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"standardizefilename","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizefilename","description":"Returns a standardized, formatted filename based on the following character substitution rules. The field value characters will be returned in a standardized format as designated below. \n- Forward slash (`/`) → Hyphen (`-`) \n- Backslash (`\\`) → Hyphen (`-`) \n- Pipe or vertical line (`|`) → Hyphen (`-`) \n- Asterisk (`*`) → Underscore (`_`) \n- Less than (`<`) → Underscore (`_`) \n- Greater than (`>`) → Underscore (`_`) \n- Question mark (`?`) → Underscore (`_`) \n- Colon (`:`) → A comma followed by a space (`, `)","examples":"\n**Example**\n\n```arcade\nvar rawFilename = \"USGS:Green River, Utah\";\nreturn StandardizeFilename(rawFilename);\n// Returns a value of \"USGS, Green River, Utah\".\n```\n\n","completion":{"label":"StandardizeFilename","detail":"StandardizeFilename(inputFilename) -> Text","insertText":"StandardizeFilename(${1:inputFilename_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a standardized, formatted filename based on the following character substitution rules. The field value characters will be returned in a standardized format as designated below. \n- Forward slash (`/`) → Hyphen (`-`) \n- Backslash (`\\`) → Hyphen (`-`) \n- Pipe or vertical line (`|`) → Hyphen (`-`) \n- Asterisk (`*`) → Underscore (`_`) \n- Less than (`<`) → Underscore (`_`) \n- Greater than (`>`) → Underscore (`_`) \n- Question mark (`?`) → Underscore (`_`) \n- Colon (`:`) → A comma followed by a space (`, `)\n\n**Parameter**\n\n- **inputFilename**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input filename to standardize.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"standardizeguid","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizeguid","description":"Returns a standardized, formatted GUID string.","examples":"\n**Examples**\n\nConverts a GUID to `digits` format\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits')\n// Returns a value of 4e6f776dc2984b4b86a457103b4d0f4a\n```\n\nConverts a GUID to `digits-hyphen` format\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits-hyphen')\n// Returns a value of 4e6f776d-c298-4b4b-86a4-57103b4d0f4a\n```\n\n","completion":{"label":"StandardizeGuid","detail":"StandardizeGuid(inputGuid, format) -> Text","insertText":"StandardizeGuid(${1:inputGuid_}, ${2:format_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a standardized, formatted GUID string.\n\n**Parameters**\n\n- **inputGuid**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The input GUID in any format to standardize.\n- **format**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - A named format for the GUID. \nPossible Values: `digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"text","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#text","description":"Converts any value into a text value. An optional `format` parameter is provided to allow for formatting date and number data inputs. Returns `null` if an equivalent text conversion cannot be determined.","examples":"\n**Examples**\n\nPad the number to the left of the decimal\n\n```arcade\nText(123, '0000') // '0123'\n```\n\nRestrict the number to the left of the decimal\n\n```arcade\nText(123, '00') // '23'\n```\n\nGroup the number by thousands\n\n```arcade\nText(1234, '#,###') // '1,234'\n```\n\nRound the number to two decimal places\n\n```arcade\nText(12345678.123, '#,###.00') // '12,345,678.12'\n```\n\nFormat number as currency\n\n```arcade\nText(1234.55, '$#,###.00') // '$1,234.55'\n```\n\nRound the number to two decimal places\n\n```arcade\nText(1.236, '#.00') // '1.24'\n```\n\nMaintain significant digits and group by thousands\n\n```arcade\nText(1234.5678, '#,##0.00#') // '1,234.568'\n```\n\nFormat the number and format positive/negative - if there is a negative subpattern, it serves only to specify the negative prefix and suffix\n\n```arcade\nText(-2, 'Floor #;Basement #') // 'Basement 2'\n```\n\n```arcade\nText(2, 'Floor #;Basement #') // 'Floor 2'\n```\n\nMultiply by 100 and format as percentage\n\n```arcade\nText(0.3, '#%') // '30%'\n```\n\nFormat date and time at the moment. eg 'Tuesday, October 25, 2016 @ 08:43:11'\n\n```arcade\nText(Now(), 'dddd, MMMM D, Y @ h:m:s')\n```\n\nFormats the date and time with the timezone\n\n```arcade\nText(startDate, 'ddd, MMM D, Y h:mm:ss A ZZZZ')\n// returns Thu, Sep 14, 2023 10:04:49 AM PDT\n```\n\n","completion":{"label":"Text","detail":"Text(value, format?) -> Text","insertText":"Text(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts any value into a text value. An optional `format` parameter is provided to allow for formatting date and number data inputs. Returns `null` if an equivalent text conversion cannot be determined.\n\n**Parameters**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - A value (i.e. date, number or other data type) to be converted to text. Starting at version 1.25, Polygon or Polyline inputs may return JSON containing curve objects when executed in ArcGIS Pro and ArcGIS Maps SDKs for Native Apps.\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Special characters for formatting dates or numbers. \nPossible values: \n - `0`: Digit \n - `#`: Digit, omitting leading/trailing zeros \n - `D`: Day of the month, not padded (1 - 31) \n - `DD`: Day of the month, padded (01 - 31) \n - `DDD`: Ordinal day of the year (1 - 365) \n - `d`: Day of the week (1 - 7) \n - `ddd`: Abbreviated day of the week (e.g. Mon) \n - `dddd`: Full day of the week (e.g. Monday) \n - `M`: Month number (1 - 12) \n - `MM`: Month number, padded (01 - 12) \n - `MMM`: Abbreviated month name (e.g. Jan) \n - `MMMM`: Full month name (e.g. January) \n - `Y`: Full year \n - `YY`: Two-digit year \n - `h`: Civilian hours, not padded (1 - 12) \n - `hh`: Civilian hours, padded (01 - 12) \n - `H`: Military hours, not padded (0 - 23) \n - `HH`: Military hours, padded (00 - 23) \n - `m`: Minutes, not padded (0 - 59) \n - `mm`: Minutes, padded (00 - 59) \n - `s`: Seconds, not padded (0 - 59) \n - `ss`: Seconds, padded (00 - 59) \n - `SSS`: Milliseconds, padded (000 - 999) \n - `A`: AM/PM \n - `Z`: Time zone offset in narrow hours +/- UTC (e.g. `-7` or `+11`) \n - `ZZ`: Time zone offset in hours +/- UTC (e.g. `-07:00` or `+11:00`) \n - `ZZZ`: Time zone offset in compact hours +/- UTC (e.g. `-0700` or `+1100`) \n - `ZZZZ`: Abbreviated named time zone (e.g. `EST`) \n - `ZZZZZ`: Named time zone (e.g. `Eastern Standard Time`) \n\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocharcode","description":"Returns a number between 0 and 65535 representing the UTF-16 code unit at the given index. Invalid halves of surrogate pairs are automatically removed.","examples":"\n**Examples**\n\nThe following example returns 88, the Unicode value for X.\n\n```arcade\nToCharCode('XYZ')\n// returns 88\n```\n\nThe following example returns 89, the Unicode value for Y.\n\n```arcade\nToCharCode('XYZ', 1)\n// returns 89\n```\n\nThe following example returns 65535.\n\n```arcade\nToCharCode('\\uFFFF\\uFFFE')\n// returns 65535\n```\n\nThe following example returns 55356.\n\n```arcade\nToCharCode('🌉')\n// returns 55356\n```\n\nThe following example returns 57097.\n\n```arcade\nToCharCode('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCharCode","detail":"ToCharCode(inputText, index?) -> Number","insertText":"ToCharCode(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a number between 0 and 65535 representing the UTF-16 code unit at the given index. Invalid halves of surrogate pairs are automatically removed.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get a UTF-16 code unit value.\n- **index** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - An integer with a value of at least 0 and no greater than the number of characters of `inputText`. By default, this value is 0.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocodepoint","description":"Returns a non-negative number representing the UTF-32 code point value of the input text. If indexed into the first half of a surrogate pair, the whole code point is returned. If indexed into the second half of the pair, this function returns the value of the second half. If a large code isn't a valid character, the function returns only the value of the half it indexes into.","examples":"\n**Examples**\n\nThe following example returns 88, the Unicode value for X.\n\n```arcade\nToCodePoint('XYZ')\n// returns 88\n```\n\nThe following example returns 89, the Unicode value for Y.\n\n```arcade\nToCodePoint('XYZ', 1)\n// returns 89\n```\n\nThe following example returns 127753.\n\n```arcade\nToCodePoint('🌉')\n// returns 127753\n```\n\nThe following example returns 57097.\n\n```arcade\nToCodePoint('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCodePoint","detail":"ToCodePoint(inputText, position?) -> Number","insertText":"ToCodePoint(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a non-negative number representing the UTF-32 code point value of the input text. If indexed into the first half of a surrogate pair, the whole code point is returned. If indexed into the second half of the pair, this function returns the value of the second half. If a large code isn't a valid character, the function returns only the value of the half it indexes into.\n\n**Parameters**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text from which to get a UTF-32 code point value.\n- **position** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - Position of a character in `inputText` from which to return the code point value. By default this value is 0.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tohex","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tohex","description":"Converts an integer to a hexidecimal representation.","examples":"\n**Examples**\n\nReturns `\"64\"`.\n\n```arcade\nToHex(100)\n```\n\nReturns the hexidecimal representation for the color royal blue, `\"#4169E1\"`, from its RGB values\n\n```arcade\nvar r = ToHex(65); // returns \"41\"\nvar g = ToHex(105); // returns \"69\"\nvar b = ToHex(225); // returns \"E1\"\nConcatenate(\"#\",r,g,b)\n// Returns \"#4169E1\"\n```\n\n","completion":{"label":"ToHex","detail":"ToHex(value) -> Text","insertText":"ToHex(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nConverts an integer to a hexidecimal representation.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The value to be converted to a hexidecimal value.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trim","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#trim","description":"Removes spaces from the beginning or end of an input text value.","examples":"\n**Example**\n\nprints 'hello world'\n\n```arcade\nTrim(' hello world')\n```\n\n","completion":{"label":"Trim","detail":"Trim(inputText) -> Text","insertText":"Trim(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nRemoves spaces from the beginning or end of an input text value.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text to be trimmed.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"upper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#upper","description":"Makes text upper case.","examples":"\n**Example**\n\nprints 'HELLO'\n\n```arcade\nUpper('Hello')\n```\n\n","completion":{"label":"Upper","detail":"Upper(inputText) -> Text","insertText":"Upper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nMakes text upper case.\n\n**Parameter**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The text value to be made uppercase.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"urlencode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode","description":"Encodes a URL by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.","examples":"\n**Example**\n\nEncodes the URL provided\n\n```arcade\nvar urlsource ='arcgis-survey123://?';\nvar params = {\n itemID:'36ff9e8c13e042a58cfce4ad87f55d19',\n center: '43.567,-117.380'\n};\nreturn urlsource + UrlEncode(params);\n//arcgis-survey123://?center=43.567%2C-117.380&itemID=36ff9e8c13e042a58cfce4ad87f55d19\n```\n\n","completion":{"label":"UrlEncode","detail":"UrlEncode(textOrDictionary) -> Text","insertText":"UrlEncode(${1:textOrDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nEncodes a URL by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\n**Parameter**\n\n- **textOrDictionary**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - The URL to be encoded.\n\n**Return value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"track_functions","title":"Track functions","items":[{"type":"function","name":"trackaccelerationat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationat","description":"The acceleration at the observation relative to the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In this example, we examine results of feature 1 (p1) with a `value` of 1. The result is equal to the acceleration of feature 2 (p2).\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(1)\naccelerationAt;\n// returns 0.0167\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In this example, we examine results of feature 1 (p1) with a `value` of 3. The result is equal to the acceleration of feature 4 (p4).\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(3)\naccelerationAt;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackAccelerationAt","detail":"TrackAccelerationAt(value) -> Number","insertText":"TrackAccelerationAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration at the observation relative to the current observation.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features before or after the current observation. \nThe current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackaccelerationwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationwindow","description":"The acceleration values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the acceleration value for each feature in the specified window. Accelerations are calculated in meters per second squared. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(-1, 2)\naccelerationWindow;\n// returns [0.0167, 0.0056, -0.0014]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the acceleration value for each feature in the specified window. Accelerations are calculated in meters per second squared. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `1` and an `endIndex` of `3`.\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(1, 3)\naccelerationWindow;\n// returns [-0.0014, 0.0014, -0.0028]\n```\n\n","completion":{"label":"TrackAccelerationWindow","detail":"TrackAccelerationWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackAccelerationWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackcurrentacceleration","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentacceleration","description":"The acceleration of the current observation measured between the previous observation and the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In the first example, we examine results of feature 2 (p2).\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns 0.0167\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the acceleration value in meters per second squared. In the following example, we examine results of feature 4 (p4).\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackCurrentAcceleration","detail":"TrackCurrentAcceleration() -> Number","insertText":"TrackCurrentAcceleration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe acceleration of the current observation measured between the previous observation and the current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentdistance","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentdistance","description":"The sum of the distances travelled between observations from the first to current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a value for the current feature in the track. In the first example, we examine results for feature 3 (p3). The calculation is `80 + 60 = 140`.\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 140\n```\n\nYour track has six features, as seen above. The expression returns a value for the current feature in the track. Your track has six features, as seen above. The expression returns a value for each feature in the track. In the following example, we examine results for feature 6 (p6). The calculation is `25 + 35 + 30 + 80 + 60 = 230`.\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 230\n```\n\n","completion":{"label":"TrackCurrentDistance","detail":"TrackCurrentDistance() -> Number","insertText":"TrackCurrentDistance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe sum of the distances travelled between observations from the first to current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentspeed","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentspeed","description":"The speed between the previous observation and the current observation.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the first example, we examine results of feature 2 (p2). The calculation is `60/60`.\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 1\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the following example, we examine results of feature 6 (p6). The calculation is `25/60`.\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 0.4167\n```\n\n","completion":{"label":"TrackCurrentSpeed","detail":"TrackCurrentSpeed() -> Number","insertText":"TrackCurrentSpeed($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed between the previous observation and the current observation.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrenttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrenttime","description":"Calculates the time on the current feature in a track.","examples":"\n**Example**\n\nReturns the time of the current feature being evaluated. For example, given a track with three features at January 1, 2012, December 9, 2012, and May 3, 2013 the current time will be evaluated for each feature. In this example, it's evaluated at the middle feature, December 9, 2012.\n\n```arcade\nTrackCurrentTime();\n// returns December 9, 2012\n```\n\n","completion":{"label":"TrackCurrentTime","detail":"TrackCurrentTime() -> Date","insertText":"TrackCurrentTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the time on the current feature in a track.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackdistanceat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistanceat","description":"The sum of the distances travelled between observations from the first to the current observation plus the given value.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a value for each feature in the track. In the first example, we examine results when evaluated at feature 2 (p2) with an index value of 2. The calculation is `30 + 80 + 60 = 170`.\n\n```arcade\nTrackDistanceAt(2)\n// returns 170\n```\n\nYour track has six features, as seen above. The expression returns a value for each feature in the track. In the following example, we examine results when evaluated at feature 4 (p4) with an index value of 4. The calculation is `25 + 35 + 30 + 80 + 60 = 230`.\n\n```arcade\nTrackDistanceAt(4)\n// returns 230\n```\n\n","completion":{"label":"TrackDistanceAt","detail":"TrackDistanceAt(index) -> Number","insertText":"TrackDistanceAt(${1:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe sum of the distances travelled between observations from the first to the current observation plus the given value.\n\n**Parameter**\n\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the track feature to calculate distance for. For example, a value of `2` would calculate the distance from the first feature (index `0`) in the track to the third feature (index `2`) in the track.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackdistancewindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistancewindow","description":"The distances between the first value (inclusive) to the last value (exclusive) in a window about the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the distance value for each feature in the window. In the first example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [60, 140, 170]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the distance value for each feature in the window. In the following example, we examine results of feature 5 (p5) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [170, 205, 230]\n```\n\n","completion":{"label":"TrackDistanceWindow","detail":"TrackDistanceWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackDistanceWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe distances between the first value (inclusive) to the last value (exclusive) in a window about the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackduration","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackduration","description":"Calculates the duration of the track from the start feature to the current feature in milliseconds from epoch.","examples":"\n**Example**\n\nReturns the duration of a track that starts on January 1, 2012 until the current feature at May 3, 2013.\n\n```arcade\nTrackDuration();\n// returns 42163200000\n```\n\n","completion":{"label":"TrackDuration","detail":"TrackDuration() -> Number","insertText":"TrackDuration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the duration of the track from the start feature to the current feature in milliseconds from epoch.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackfieldwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackfieldwindow","description":"Returns an array of attribute values from the specified `field` for the specified time span. The window function allows you to go forward and backward in time.","examples":"\n**Examples**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. Results are returned inclusive of the start feature, and exclusive of the end feature. This example is evaluated at the second feature (20) and returns an array of the previous value (-1, inclusive).\n\n```arcade\nvar window = TrackFieldWindow('MyField', -1,0)\nwindow;\n// returns [10]\n```\n\nYour track has a field named `Speed` with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature. \n\n```arcade\nvar window = TrackFieldWindow('Speed', -2,2)\nwindow;\n// returns [10,20,30,40]\n```\n\n","completion":{"label":"TrackFieldWindow","detail":"TrackFieldWindow(fieldName, startIndex, endIndex) -> Array<Number>","insertText":"TrackFieldWindow(${1:fieldName_}, ${2:startIndex_}, ${3:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of attribute values from the specified `field` for the specified time span. The window function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name from which to return values.\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"trackgeometrywindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackgeometrywindow","description":"Returns an array of geometries for the specified time indices. The window function allows you to go forward and backward in time.","examples":"\n**Example**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature\n\n```arcade\nvar window = TrackGeometryWindow(-2,2)\nwindow;\n// returns [{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}]\n```\n\n","completion":{"label":"TrackGeometryWindow","detail":"TrackGeometryWindow(startIndex, endIndex) -> Array<Geometry>","insertText":"TrackGeometryWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of geometries for the specified time indices. The window function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackindex","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackindex","description":"Returns the index of the feature being calculated. Features are indexed in order of time within a track.","examples":"\n**Example**\n\nReturns the index of the first feature in a track.\n\n```arcade\nTrackIndex() // returns 0\n```\n\n","completion":{"label":"TrackIndex","detail":"TrackIndex() -> Number","insertText":"TrackIndex($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns the index of the feature being calculated. Features are indexed in order of time within a track.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackspeedat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedat","description":"The speed at the observation relative to the current observation. For example, at value 2, it's the speed at the observation two observations after the current.","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the first example, we examine results of feature 1 (p1) with a `value` of 2. The calculation is `80/60`.\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1.33\n```\n\nYour track has six features, as seen above. The expression returns a number for each feature representing the speed calculated in meters per second. In the following example, we examine results of feature 3 (p3) with a `value` of -1. The calculation is `60/60`.\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1\n```\n\n","completion":{"label":"TrackSpeedAt","detail":"TrackSpeedAt(value) -> Number","insertText":"TrackSpeedAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed at the observation relative to the current observation. For example, at value 2, it's the speed at the observation two observations after the current.\n\n**Parameter**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The number of features before or after the current observation. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackspeedwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedwindow","description":"The speed values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).","examples":"\n**Examples**\n\nYour track has six features, as seen above. The expression returns an array containing the speed value for each feature in the specified window. Speeds are calculated in meters per second. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `-1` and an `endIndex` of `2`.\n\n```arcade\nvar speedWindow = TrackSpeedWindow(-1, 2)\nspeedWindow // returns [1, 1.3, 0.5]\n```\n\nYour track has six features, as seen above. The expression returns an array containing the speed value for each feature in the specified window. Speeds are calculated in meters per second. In this example, we examine results of feature 3 (p3) when evaluated with a `startIndex` of `1` and an `endIndex` of `3`.\n\n```arcade\nvar speedWindow = TrackSpeedWindow(1,3)\nspeedWindow // returns [0.5, 0.583, 0.4167]\n```\n\n","completion":{"label":"TrackSpeedWindow","detail":"TrackSpeedWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackSpeedWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nThe speed values between the first value (inclusive) to the last value (exclusive) in a window around the current observation (0).\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index 0. Positive values represent features that occur in the future, after the current value. For example, position 1 is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, -1 is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number)>"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackstarttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackstarttime","description":"Calculates the start time of a track.","examples":"\n**Example**\n\nReturns the start time of a track that spans from January 1, 2012 to May 3, 2013.\n\n```arcade\nTrackStartTime() // returns January 1, 2012\n```\n\n","completion":{"label":"TrackStartTime","detail":"TrackStartTime() -> Date","insertText":"TrackStartTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nCalculates the start time of a track.\n\n**Return value**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackwindow","description":"Returns an array of features for the specified time index. This function allows you to go forward and backward in time.","examples":"\n**Examples**\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. Results are returned inclusive of the start feature, and exclusive of the end feature. This example is evaluated at the second feature (20) and returns an array of a single value -- the previous feature.\n\n```arcade\nvar window = TrackWindow(-1,0)\nwindow;\n// returns [{'geometry': {x: 1, y: 1}}, {'attributes': {'MyField' : 10, 'trackName':'ExampleTrack1'}}]\n```\n\nYour track has a field with sequentially ordered values of `[10, 20, 30, 40, 50]`. The geometries of the features are `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`. The expression is evaluated at each feature in the track. For this example, we examine results when evaluated at the third feature (30). Results are returned inclusive of the start feature, and exclusive of the end feature.\n\n```arcade\nvar window = TrackWindow(-2,2)\nwindow;\n/* returns\n[{\n geometry: [{\n x: 1,\n y: 1\n }, {\n x: 2,\n y: 2\n }, {\n x: null,\n y: null\n }, {\n x: 4,\n y: 4\n }]\n}, {\n attributes: [{\n MyField: 10,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 20,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 30,\n trackName: 'ExampleTrack1'\n }, {\n MyField: 40,\n trackName: 'ExampleTrack1'\n }]\n}]\n```\n\n","completion":{"label":"TrackWindow","detail":"TrackWindow(startIndex, endIndex) -> Array<Feature>","insertText":"TrackWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns an array of features for the specified time index. This function allows you to go forward and backward in time.\n\n**Parameters**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the beginning feature. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - The index of the feature at the end of the window. The current feature is index `0`. Positive values represent features that occur in the future, after the current value. For example, position `1` is the next value in the array. Negative numbers represent features that occurred in the past, before the current feature. For example, `-1` is the previous value in the array.\n\n**Return value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)>"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"voxel_functions","title":"Voxel functions","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#defaultvalue","description":"Returns a specified default value if a field name in a voxel does not exist or the value of the specified field is `null` or an empty text value.","examples":"\n**Example**\n\nReturn \"n/a\" if voxel attribute does not exist or is empty\n\n```arcade\nDefaultValue($voxel, \"sea_temp\", \"n/a\")\n// Returns the sea_temp value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputVoxel, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputVoxel_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nReturns a specified default value if a field name in a voxel does not exist or the value of the specified field is `null` or an empty text value.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The input voxel to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - This value is returned if the field name does not exist or the value of the specified field is `null` or an empty text value.\n\n**Return value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) \nReturns the value for the specified field if defined. Otherwise, returns the value specified in `defaultValue`."}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#haskey","description":"Indicates whether a voxel has the input key.","examples":"\n**Example**\n\nReturns `true` if the voxel has a field named `sea_temp`\n\n```arcade\nHasKey($voxel, 'sea_temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputVoxel, key) -> Boolean","insertText":"HasKey(${1:inputVoxel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a voxel has the input key.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to check for a field name.\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#hasvalue","description":"Indicates whether a voxel has a given field and if that field has a value.","examples":"\n**Example**\n\nReturn false if voxel attribute does not exist or is empty\n\n```arcade\niif(HasValue($voxel, \"sea_temp\"), ($voxel.sea_temp - 32) * 5/9, false)\n// Returns the temp in celsius if sea_temp is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputVoxel, fieldName) -> Boolean","insertText":"HasValue(${1:inputVoxel_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[Since version 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\nIndicates whether a voxel has a given field and if that field has a value.\n\n**Parameters**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - The voxel to check.\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - The field name to check.\n\n**Return value**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**Additional resources**\n\n* [Safe access operator](https://developers.arcgis.com/arcade/guide/operators/#safe-access-operator)\n"}},"parametersInfo":{"min":2,"max":2}}]}]
|