{"id":1573422,"date":"2023-08-01T03:00:55","date_gmt":"2023-08-01T10:00:55","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1573422"},"modified":"2023-08-02T08:15:55","modified_gmt":"2023-08-02T15:15:55","slug":"common-calculated-expressions-for-arcgis-field-maps","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","title":{"rendered":"Common calculated expressions for ArcGIS Field Maps"},"author":8272,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23261],"tags":[32551,765152,39831,317882,317872],"industry":[],"product":[679821],"class_list":["post-1573422","blog","type-blog","status-publish","format-standard","hentry","category-field-mobility","tag-arcade","tag-calculation","tag-data-collection","tag-forms","tag-smart-forms","product-field-maps"],"acf":{"authors":[{"ID":8072,"user_firstname":"Doug","user_lastname":"Morgenthaler","nickname":"Doug Morgenthaler","user_nicename":"dmorgenthaler","display_name":"Doug Morgenthaler","user_email":"dmorgenthaler@esri.com","user_url":"","user_registered":"2018-06-04 19:43:21","user_description":"Doug is a Product Engineering lead for ArcGIS Field Maps. He works to extend the reach of GIS to include the mobile workforce to help organizations make quicker, more informed decisions.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/85699de2d3814ea804d9df2eacdf83de5e2c8968e5c659f92710ff07436df8b1?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/85699de2d3814ea804d9df2eacdf83de5e2c8968e5c659f92710ff07436df8b1?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"},{"ID":3651,"user_firstname":"Jeff","user_lastname":"Shaner","nickname":"Jeff Shaner","user_nicename":"jeffs","display_name":"Jeff Shaner","user_email":"jshaner@esri.com","user_url":"","user_registered":"2018-03-02 00:15:17","user_description":"Jeff Shaner is a Product Engineering Director with the software products team at Esri. With 30 years experience, Jeff is focused on delivering apps that enable users to work more productively, safely, and effectively. In his spare time, you are likely to find Jeff on the golf course or hockey rink.\u00a0","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/6bfe4b81e250b7cf2d6e46c21da33b3f142233feb7bb4770c7416e16b17331f5?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/6bfe4b81e250b7cf2d6e46c21da33b3f142233feb7bb4770c7416e16b17331f5?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"short_description":"A guide to get up and running with form calculations so you can streamline your data collection workflows in ArcGIS Field Maps.","flexible_content":[{"acf_fc_layout":"content","content":"<p>Calculated expressions in\u00a0<a class=\"c-link\" href=\"https:\/\/www.esri.com\/en-us\/arcgis\/products\/arcgis-field-maps\/overview\" target=\"_blank\" rel=\"noopener noreferrer\" data-stringify-link=\"https:\/\/www.esri.com\/en-us\/arcgis\/products\/arcgis-field-maps\/overview\" data-sk=\"tooltip_parent\" data-remove-tab-index=\"true\">ArcGIS Field Maps<\/a> streamline all kinds of data collection workflows from storing location as an attribute, to pulling attributes from related records or other layers in the map. In this blog post, we\u2019ll walk through some of the most common use cases and provide sample code to get you up and running with calculated expressions in your own forms.<\/p>\n<p>If you\u2019re not familiar with Arcade, you can read the\u00a0<a class=\"c-link\" href=\"https:\/\/developers.arcgis.com\/arcade\/\" target=\"_blank\" rel=\"noopener noreferrer\" data-stringify-link=\"https:\/\/developers.arcgis.com\/arcade\/\" data-sk=\"tooltip_parent\" data-remove-tab-index=\"true\">documentation<\/a>\u00a0or try using it in the\u00a0<a class=\"c-link\" href=\"https:\/\/developers.arcgis.com\/arcade\/playground\/\" target=\"_blank\" rel=\"noopener noreferrer\" data-stringify-link=\"https:\/\/developers.arcgis.com\/arcade\/playground\/\" data-sk=\"tooltip_parent\" data-remove-tab-index=\"true\">playground<\/a>. For step-by-step instructions on how to add expressions to the form in Field Maps Designer, see <a class=\"c-link\" href=\"https:\/\/doc.arcgis.com\/en\/field-maps\/android\/help\/configure-the-form.htm#ESRI_SECTION2_5F65DF4B642C4A4D9CAFE6A4BF6BB676\" target=\"_blank\" rel=\"noopener noreferrer\" data-stringify-link=\"https:\/\/doc.arcgis.com\/en\/field-maps\/android\/help\/configure-the-form.htm#ESRI_SECTION2_5F65DF4B642C4A4D9CAFE6A4BF6BB676\" data-sk=\"tooltip_parent\" data-remove-tab-index=\"true\">Add calculated expressions<\/a>. Let\u2019s jump right in and see what\u2019s possible!<\/p>\n<h2>1. Fetch an attribute from an underlying polygon<\/h2>\n<p>Sometimes, it can be valuable to store the geographic area a feature was collected in. In the past, this could be done manually by selecting the region from a list of values or by post processing the data. Now, this can be streamlined and automatically captured in the field by using a form calculation that performs a spatial intersection of the current location and a layer of polygons representing the geographic areas.<\/p>\n<p><strong>Example<\/strong>: I am recording bird sightings and want to automatically store the region I\u2019m in.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Create a feature set using the 'Regions' layer in the map<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> regions = FeatureSetByName($map, <span style=\"color: #d14\">'Regions'<\/span>, [<span style=\"color: #d14\">'name'<\/span>])\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Intersect the current location with the regions and <\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ get the first region<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> region = First(Intersects($feature, regions))\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ If the current location does intersect a feature, <\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ return the name of the region. Otherwise, return null<\/span>\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (!IsEmpty(region)) {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> region[<span style=\"color: #d14\">'name'<\/span>]\r\n} <span style=\"color: #333;font-weight: bold\">else<\/span> {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span>\r\n}\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1573762,"id":1573762,"title":"Bird Sightings Example","filename":"bird_sightings.gif","filesize":861298,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/bird_sightings","alt":"Bird Sightings Example","author":"8272","description":"","caption":"","name":"bird_sightings","status":"inherit","uploaded_to":1573422,"date":"2022-05-10 14:18:28","modified":"2022-05-10 14:18:59","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sightings.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>2. Fetch an attribute from a related record<\/h2>\n<p>When performing inspections, it\u2019s often necessary to store information about the parent feature such as the address, or type of asset. These attributes can be pulled from the parent layer by querying the related records and accessing the necessary attributes.<\/p>\n<p><strong>Example<\/strong>: I\u2019m inspecting hydrants and need to record the Facility ID with each inspection.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\n<span style=\"color: #998;font-style: italic\">\/\/ Get the feature set for the hydrants<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> hydrants = FeatureSetByRelationshipName($feature, <span style=\"color: #d14\">'wHydrant'<\/span>, [<span style=\"color: #d14\">'facilityid'<\/span>], <span style=\"color: #333;font-weight: 500\">true<\/span>)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Get the first hydrant (should only be one)<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> hydrant = First(hydrants)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ If there was a hydrant, return the facilityid of it,<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ Otherwise, return null<\/span>\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (!IsEmpty(hydrant)) {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> hydrant[<span style=\"color: #d14\">'facilityid'<\/span>]\r\n} <span style=\"color: #333;font-weight: bold\">else<\/span> {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span>\r\n}<\/code><\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1573772,"id":1573772,"title":"Hydrant Inspections ID","filename":"hydrant_inspections_id.gif","filesize":470362,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/hydrant_inspections_id","alt":"Hydrant Inspections ID","author":"8272","description":"","caption":"","name":"hydrant_inspections_id","status":"inherit","uploaded_to":1573422,"date":"2022-05-10 14:22:22","modified":"2022-05-10 14:22:53","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_id.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>3. Store a user&#8217;s name, email address, or username<\/h2>\n<p>When performing inspections or collecting new data, editor tracking works great for storing the username of the person who created or edited the feature, but it doesn\u2019t store the user&#8217;s full name or email address. Having these extra attributes can make it much easier to understand the data when displayed in reports, maps, and dashboards. This can be accomplished by getting the signed in user&#8217;s info via Arcade.<\/p>\n<p><strong>Example<\/strong>: I\u2019m filling out a damage inspection report and need to provide my name.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\nGetUser($layer).fullName\r\n<\/code><\/pre>\n<p><em>Note: At version 22.3 of Field Maps, this does not work if the device is offline.<br \/>\n<\/em><\/p>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1574022,"id":1574022,"title":"Inspectors Name","filename":"hydrant_inspections_name.gif","filesize":509932,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/hydrant_inspections_name","alt":"Inspectors Name","author":"8272","description":"","caption":"","name":"hydrant_inspections_name","status":"inherit","uploaded_to":1573422,"date":"2022-05-10 20:27:58","modified":"2022-05-10 20:28:22","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/hydrant_inspections_name.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>4. Calculate the current date and time<\/h2>\n<p>When performing inspections, it\u2019s often useful to set the inspection date to the current date and time. While the mobile worker can do this in the mobile app with a few taps, it can be more efficient to auto-populate this information using an Arcade expression.<\/p>\n<p><strong>Example<\/strong>: I\u2019m filling out a damage inspection report and need to set the inspection date.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\nNow()\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1574362,"id":1574362,"title":"Damage Assessment","filename":"damage_assessment_date.gif","filesize":752313,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/damage_assessment_date","alt":"Damage Assessment","author":"8272","description":"","caption":"","name":"damage_assessment_date","status":"inherit","uploaded_to":1573422,"date":"2022-05-11 14:40:28","modified":"2022-05-11 14:40:51","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/damage_assessment_date.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>5. Store the geometry as an attribute<\/h2>\n<p>When integrating with other systems, it can be useful to store aspects of the geometry as separate attributes. This can be done by accessing the feature&#8217;s geometry via Arcade.<\/p>\n<p><strong>Example<\/strong>: When working with high accuracy GNSS receivers, the <strong>orthometric height<\/strong> is stored in the z-value of the geometry and I need to also store and display the orthometric height as an attribute value for point features collected in the field.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #998;font-style: italic\">\/\/ Get the Z value<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> geom = Geometry($feature)\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (IsEmpty(geom)) {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span>\r\n} <span style=\"color: #333;font-weight: bold\">else<\/span> {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> geom.Z\r\n}\r\n<\/code><\/pre>\n"},{"acf_fc_layout":"content","content":"<p>Sometimes, the raw x and y location are not what you need. You might need the latitude and longitude. If your map and data are using Web Mercator Projection you can write code to calculate the latitude and longitude from the x, y meter values.<\/p>\n<p><strong>Example<\/strong>: I need to store the latitude and longitude values to conform to some standard data collection specification.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\n<span style=\"color: #998;font-style: italic\">\/\/ Create a function to convert meters to lat, long<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ Source: http:\/\/www.maptiler.org\/google-maps-coordinates-tile-bounds-projection\/<\/span>\r\n<span style=\"color: #333;font-weight: bold\">function<\/span> <span style=\"color: #900;font-weight: bold\">MetersToLatLon<\/span>(geometry) {\r\n    <span style=\"color: #333;font-weight: bold\">if<\/span> (IsEmpty(geometry)) {\r\n        <span style=\"color: #333;font-weight: bold\">return<\/span> [<span style=\"color: #333;font-weight: 500\">null<\/span>, <span style=\"color: #333;font-weight: 500\">null<\/span>]\r\n    }\r\n    <span style=\"color: #333;font-weight: bold\">var<\/span> originShift = <span style=\"color: #008080\">2.0<\/span> * PI * <span style=\"color: #008080\">6378137.0<\/span> \/ <span style=\"color: #008080\">2.0<\/span>    \r\n    <span style=\"color: #333;font-weight: bold\">var<\/span> lon = (geometry.x \/ originShift) * <span style=\"color: #008080\">180.0<\/span>\r\n    <span style=\"color: #333;font-weight: bold\">var<\/span> lat = (geometry.y \/ originShift) * <span style=\"color: #008080\">180.0<\/span> \r\n    lat = <span style=\"color: #008080\">180.0<\/span> \/ PI * (<span style=\"color: #008080\">2.0<\/span> * Atan( Exp( lat * PI \/ <span style=\"color: #008080\">180.0<\/span>)) - PI \/ <span style=\"color: #008080\">2.0<\/span>)    \r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> [Round(lat, <span style=\"color: #008080\">6<\/span>), Round(lon, <span style=\"color: #008080\">6<\/span>)]\r\n}\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Call the function and return the latitude or longitude value<\/span>\r\nMetersToLatLon(Geometry($feature))[<span style=\"color: #008080\">0<\/span>]\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1574442,"id":1574442,"title":"Store Geometry Attributes","filename":"bird_sighting_geom.gif","filesize":1140664,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/bird_sighting_geom","alt":"Store Geometry Attributes","author":"8272","description":"","caption":"","name":"bird_sighting_geom","status":"inherit","uploaded_to":1573422,"date":"2022-05-11 17:09:22","modified":"2022-05-11 17:10:50","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/bird_sighting_geom.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>When collecting or updating the geometry of a feature, you may want to automatically calculate the length of a line or the area of a polygon as a field value.\u00a0 Use the <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#areageodetic\" target=\"_blank\" rel=\"noopener\">AreaGeodetic() function<\/a> or <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#lengthgeodetic\" target=\"_blank\" rel=\"noopener\">LengthGeodetic() function<\/a>. to calculate length or area using the feature geometry instead of using the Shape_Area and Shape_Length fields. Those fields are updated after edits are submitted and your calculations may not reflect changes to the geometry.<\/p>\n<p><strong>Example<\/strong>: I need to store the acreage of a forest stand as an attribute and would like to round the value to 3 decimal places.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #998;font-style: italic\">\/\/ Calculate the area using the geometry<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> geom = Geometry($feature)\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (IsEmpty(geom)) {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span>\r\n} <span style=\"color: #333;font-weight: bold\">else<\/span> {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> Round(AreaGeodetic($feature, 'acres'), 3)\r\n}<\/code><\/pre>\n<h2>6. Calculate a value from other fields<\/h2>\n<p>Often, it can be useful to calculate a value based on one or more fields that the mobile user fills out.<\/p>\n<p><strong>Example:<\/strong> I need to calculate the score when doing a damage assessment report. Certain things (e.g., the roof, foundation, habitability.) are scored based on their damage level. I need to sum all these independent scores into a single value to use for filtering and visualization.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\n$feature[<span style=\"color: #d14\">\"foundation_condition\"<\/span>] + $feature[<span style=\"color: #d14\">\"roof_condition\"<\/span>] + $feature[<span style=\"color: #d14\">\"habitability\"<\/span>]\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1574512,"id":1574512,"title":"Damage Assessment Score","filename":"custom_damage_assessment.gif","filesize":873979,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/custom_damage_assessment","alt":"Damage Assessment Score","author":"8272","description":"","caption":"","name":"custom_damage_assessment","status":"inherit","uploaded_to":1573422,"date":"2022-05-11 17:39:12","modified":"2022-05-11 17:39:37","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/custom_damage_assessment.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>7. Store info about a nearby feature<\/h2>\n<p>When installing new assets or planting trees, it&#8217;s often useful to store the nearest address.<\/p>\n<p><strong>Example:<\/strong> I&#8217;m planting new trees in a neighborhood and want to store the nearest address using existing parcel data.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\">\r\n<span style=\"color: #998;font-style: italic\">\/\/ If feature doesn't have geometry return null<\/span>\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (IsEmpty(Geometry($feature))) { <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span> }\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Get the parcels layer<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> parcels = FeatureSetByName($map, <span style=\"color: #d14\">'Parcels'<\/span>)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Buffer the current location and intersect with parcels<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> bufferedLocation = Buffer($feature, <span style=\"color: #008080\">100<\/span>, <span style=\"color: #d14\">'feet'<\/span>)\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> candidateParcels = Intersects(parcels, bufferedLocation)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Calculate the distance between the parcel and the current location<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ Store the feature and distance as a dictionary and push it into an array<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> featuresWithDistances = []\r\n<span style=\"color: #333;font-weight: bold\">for<\/span> (<span style=\"color: #333;font-weight: bold\">var<\/span> f <span style=\"color: #333;font-weight: bold\">in<\/span> candidateParcels) {\r\n    Push(featuresWithDistances, \r\n        {\r\n            <span style=\"color: #d14\">'distance'<\/span>: Distance($feature, f, <span style=\"color: #d14\">'feet'<\/span>),\r\n            <span style=\"color: #d14\">'feature'<\/span>: f\r\n        }\r\n    )\r\n}\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Sort the candidate parcels by distance using a custom function<\/span>\r\n<span style=\"color: #333;font-weight: bold\">function<\/span> <span style=\"color: #900;font-weight: bold\">sortByDistance<\/span>(a, b) {\r\n    <span style=\"color: #333;font-weight: bold\">return<\/span> a[<span style=\"color: #d14\">'distance'<\/span>] - b[<span style=\"color: #d14\">'distance'<\/span>]\r\n}\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> sorted = Sort(featuresWithDistances, sortByDistance)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Get the closest feature<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> closestFeatureWithDistance = First(sorted)\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ If there was no feature, return null<\/span>\r\n<span style=\"color: #333;font-weight: bold\">if<\/span> (IsEmpty(closestFeatureWithDistance)) { <span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #333;font-weight: 500\">null<\/span> }\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ Return the address<\/span>\r\n<span style=\"color: #333;font-weight: bold\">return<\/span> <span style=\"color: #d14\">`<span style=\"color: #333;font-weight: normal\">${closestFeatureWithDistance['feature']['ADDNUM']}<\/span> <span style=\"color: #333;font-weight: normal\">${closestFeatureWithDistance['feature']['ADDRESSNAM']}<\/span>`<\/span>\r\n<\/code><\/pre>\n"},{"acf_fc_layout":"image","image":{"ID":1587842,"id":1587842,"title":"Nearest address","filename":"nearest_address.gif","filesize":1656434,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\/nearest_address","alt":"Nearest address","author":"8272","description":"","caption":"","name":"nearest_address","status":"inherit","uploaded_to":1573422,"date":"2022-05-31 19:56:45","modified":"2022-05-31 19:57:14","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":319,"height":692,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","medium-width":120,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","medium_large-width":319,"medium_large-height":692,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","large-width":319,"large-height":692,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","1536x1536-width":319,"1536x1536-height":692,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","2048x2048-width":319,"2048x2048-height":692,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address-214x465.gif","card_image-width":214,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/05\/nearest_address.gif","wide_image-width":319,"wide_image-height":692}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2>Summary<\/h2>\n<p>We\u2019ve shown quite a few different examples here, there\u2019s so much more that you can do with Arcade and form calculations though! If you have any questions or would like to share how you use form calculations please post in the <a href=\"https:\/\/community.esri.com\/t5\/arcgis-field-maps\/ct-p\/arcgis-field-maps\">ArcGIS Field Maps Community<\/a> forum or email us at <a href=\"mailto:arcgisfieldmaps@esri.com\">arcgisfieldmaps@esri.com<\/a>.<\/p>\n"}],"related_articles":"","card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/06\/ArcGISFieldMaps826.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/06\/ArcGIS-Field-Maps-Background-1920_1080.jpg"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Common calculated expressions for ArcGIS Field Maps<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Common calculated expressions for ArcGIS Field Maps\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-02T15:15:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\"},\"author\":{\"name\":\"Aaron Pulver\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/8d54151f4591c7f17798ea38801e11c7\"},\"headline\":\"Common calculated expressions for ArcGIS Field Maps\",\"datePublished\":\"2023-08-01T10:00:55+00:00\",\"dateModified\":\"2023-08-02T15:15:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\"},\"wordCount\":7,\"commentCount\":18,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"arcade\",\"calculation\",\"data collection\",\"Forms\",\"Smart Forms\"],\"articleSection\":[\"Field Operations\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\",\"name\":\"Common calculated expressions for ArcGIS Field Maps\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2023-08-01T10:00:55+00:00\",\"dateModified\":\"2023-08-02T15:15:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Common calculated expressions for ArcGIS Field Maps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/8d54151f4591c7f17798ea38801e11c7\",\"name\":\"Aaron Pulver\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/2099642.jpeg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/2099642.jpeg\",\"caption\":\"Aaron Pulver\"},\"description\":\"Aaron is a lead Product Engineer on the Field Apps team primarily focused on location sharing, smart forms, and automation. In his free time, you can often find him hiking, camping, or kayaking throughout Central New York.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/apulverizer\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/apulver\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Common calculated expressions for ArcGIS Field Maps","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","og_locale":"en_US","og_type":"article","og_title":"Common calculated expressions for ArcGIS Field Maps","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2023-08-02T15:15:55+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps"},"author":{"name":"Aaron Pulver","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/8d54151f4591c7f17798ea38801e11c7"},"headline":"Common calculated expressions for ArcGIS Field Maps","datePublished":"2023-08-01T10:00:55+00:00","dateModified":"2023-08-02T15:15:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps"},"wordCount":7,"commentCount":18,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["arcade","calculation","data collection","Forms","Smart Forms"],"articleSection":["Field Operations"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","name":"Common calculated expressions for ArcGIS Field Maps","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2023-08-01T10:00:55+00:00","dateModified":"2023-08-02T15:15:55+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Common calculated expressions for ArcGIS Field Maps"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/8d54151f4591c7f17798ea38801e11c7","name":"Aaron Pulver","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/2099642.jpeg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/08\/2099642.jpeg","caption":"Aaron Pulver"},"description":"Aaron is a lead Product Engineer on the Field Apps team primarily focused on location sharing, smart forms, and automation. In his free time, you can often find him hiking, camping, or kayaking throughout Central New York.","sameAs":["https:\/\/www.linkedin.com\/in\/apulverizer"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/apulver"}]}},"text_date":"August 1, 2023","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/field-maps\/field-mobility\/common-calculated-expressions-for-arcgis-field-maps","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/06\/ArcGIS-Field-Maps-Background-1920_1080.jpg","primary_product":"ArcGIS Field Maps","tag_data":[{"term_id":32551,"name":"arcade","slug":"arcade","term_group":0,"term_taxonomy_id":32551,"taxonomy":"post_tag","description":"","parent":0,"count":113,"filter":"raw"},{"term_id":765152,"name":"calculation","slug":"calculation","term_group":0,"term_taxonomy_id":765152,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":39831,"name":"data collection","slug":"data-collection","term_group":0,"term_taxonomy_id":39831,"taxonomy":"post_tag","description":"","parent":0,"count":64,"filter":"raw"},{"term_id":317882,"name":"Forms","slug":"forms","term_group":0,"term_taxonomy_id":317882,"taxonomy":"post_tag","description":"","parent":0,"count":23,"filter":"raw"},{"term_id":317872,"name":"Smart Forms","slug":"smart-forms","term_group":0,"term_taxonomy_id":317872,"taxonomy":"post_tag","description":"","parent":0,"count":35,"filter":"raw"}],"category_data":[{"term_id":23261,"name":"Field Operations","slug":"field-mobility","term_group":0,"term_taxonomy_id":23261,"taxonomy":"category","description":"","parent":0,"count":617,"filter":"raw"}],"product_data":[{"term_id":679821,"name":"ArcGIS Field Maps","slug":"field-maps","term_group":0,"term_taxonomy_id":679821,"taxonomy":"product","description":"","parent":36591,"count":153,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=field-maps","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1573422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/8272"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=1573422"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1573422\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=1573422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=1573422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=1573422"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=1573422"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=1573422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}