Select to view content in your preferred language

Arcade expression for offline intersect

228
5
Jump to solution
11-14-2024 06:06 PM
FrankHerbert
Occasional Contributor

I have a really simple QuickCapture project for a biodiversity monitoring survey. Since we work in the bush, the project needs to work offline. We capture data in operational areas, and I would like the survey to intersect with the operational area and pass the name attribute to the survey.

So far, I have created a MMPK containing the operational areas and added it to the QC project. This is just vector data, projected in EPSG3857. From QuickCapture, I can open the basemap and see the layer names, the geometry and everything looks good.

I have tried to add the arcade expression to the operational area attribute field but it wouldn't work. From the Arcade Expression window, I checked the $map Profile variable, and I noticed there weren't any items (or layers) to view. I'm guessing this is where the map layers will show up so you can query them from the expression. I'm not sure why I'm unable to create the expression but I think it might be something to do with how the map interacts with the project.

Any help/suggestions would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Related bug: BUG-000170292 In the ArcGIS Quick Capture project, the Arcade expression including 'FeatureSetByName' fails if a mobile map package (MMPK) is configured as the project map.

$map is not being populated if the project map is an mmpk. We are looking into this issue.

View solution in original post

5 Replies
ChristopherCounsell
MVP Regular Contributor

https://community.esri.com/t5/arcgis-quickcapture-blog/streamline-field-data-collection-in-quickcapt...

all layers referenced by your Arcade expression need to be online feature layers or tables (not Mobile Map Packages)

You might need to set up the MMPK for offline visualization and then have an online layer that will run the arcade expression when you send it?

https://doc.arcgis.com/en/quickcapture/help/arcade-expressions.htm

0 Kudos
FrankHerbert
Occasional Contributor

Thanks for your response @ChristopherCounsell 

I'll have a play around with the MMPK settings. I have gotten this to work quite well on Field Maps - loaded the layers onto my basemap and then download the project area via Field Maps. The intersect works when the data is sent to AGOL. The whole thing works offline too so hoping to replicate for QuickCapture. I'll see what i can do with it today

0 Kudos
FrankHerbert
Occasional Contributor

@ChristopherCounsell I've tried changing some settings on the MMPK basemap, and loaded it into QuickCapture, but I still can't see the layer attributes from querying the layer inside of the arcade expression window. Please can you have a look at the screenshots and let me what it should look like? When I click on the $map variable, there are no items showng up. I'm not sure what i'm doing wrong.

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Related bug: BUG-000170292 In the ArcGIS Quick Capture project, the Arcade expression including 'FeatureSetByName' fails if a mobile map package (MMPK) is configured as the project map.

$map is not being populated if the project map is an mmpk. We are looking into this issue.

kmsmikrud
Frequent Contributor

Hi,

I was actually going to ask about arcade expressions like intersect and working offline.  I had read this info in a Blog post.

"Although you need to be online for Arcade expressions to run in QuickCapture, you can still capture your features while offline. The Arcade expressions will automatically run once the device is back online (and the map loaded) and will be uploaded to ArcGIS."

If I understand this correctly I can reference an AGOL web map in the Quick Capture Designer and use the 'FeatureSetByName($map, layer) followed by the intersect. Records collected offline will record and then when WiFi the arcade statements will run prior to the records sending to AGOL?

Thanks in advance,

Kathy

0 Kudos