Flagging inspected assets with ArcGIS Collector

1458
16
Jump to solution
05-17-2021 11:16 AM
TahirTamba1
New Contributor III

Hi,

I have several assets to inspect in a small area. How do I know if an asset has already been inspected so that I cannot inspect the same asset a second and third time. Is it possible to configure the Collector form app so that when the form is completed and submitted by the field worker, the point changes color according to the predefined color?

The only working alternative is the join between the feature layer and the inspection table by creating a style based on a single symbol using location.

However, this approach limits my operations since the inspections are recurrent and are done on a weekly basis. When the current round is completed, I have to truncate the inspection table for the next round.
This approach is time consuming and I have to backup and archive the inspection table. But also, it is inefficient to produce a dashboard from inspections made with ArcGIS Collector.

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Kevin_McIntyre
New Contributor III

What you specifically want from ESRI is to be able to use the FeatureSetByName() function in Arcade to create a symbology expression. AGOL and FieldMaps do not support this function for whatever reason when using it for symbology. So while you could create a popup expression in Arcade to pull from a related table and display the most recent inspection in the popup, you won't be able to symbolize your features based on that expression in the popup. 

 As far as not knowing how to code, ESRI did a pretty good write up on using web hooks in AGOL with no coding involved and if you spend some time reading up on editing features through the REST service, you could then update that Inspection flag field in your main feature class to show the last time the feature was inspected or is due for an inspection.

Unfortunately, ArcGIS Online is in my opinion a service that is to be developed upon for organizations to tailor their own needs to. While there are a lot of features packed in AGOL that make it user-friendly and useful in some organizations, it is fairly bare bones as far as asset management software goes and requires a fair amount of technical expertise to go beyond simple feature edits/creates or displaying of data. In my case, I had to develop an entire Python web application that could receive web hooks from AGOL and manipulate the data to do what I needed it to, including flagging assets for inspections and automated work order creation in WorkForce. A simpler version of this would be to create a scheduled Notebook to run every so often and update that InspectionFlag field in your feature class based on the most recent inspection.

View solution in original post

16 Replies
Kevin_McIntyre
New Contributor III

Using Arcade expressions can probably get you where you need to be.

Reference this link to find out how to grab information from related tables through Arcade. 

0 Kudos
ttamba
by
New Contributor III

Hi Kevin,

Thank you for your response and the Arcade resource. Since my data is related to linked tables, I will like to color the inspected points according to the inspection date once the form is completed and submitted.

I am new to Arcade and I've tried the code below but the inspected points did not change color.

var StartDate = now()
var InspectionDate = Round(DateDiff($feature.DateInspection, StartDate, "days"))

if (Round(DateDiff($feature.DateInspection, StartDate, "days"))==0) {
var hour = Round(DateDiff($feature.DateInspection, StartDate, "hours"))
var currentdate = When(hour>5, 1, hour>3, 2, hour>1, 3,1)
return currentdate
}
else{
return 0
}

 

 

0 Kudos
JonathanMcDougall
Occasional Contributor III

I wish there was more we could do with the inspection table, especially where it comes to ensuring the right data is being inspected in the field. If I remember correctly, Arcade expressions are only of use in AGOL and don't transfer to the Collector App (I could be completely wrong and if so I should find out how to learn Arcade).
We have a number of inspections in the field, one for over 20k objects, an other 100 object inspected every 14 days.
I realise AGOL is not an asset management system as such, so we will run into difficulties, however, would be really nice if ESRI progressed development somewhat in that direction.

Like you, I've had to create a join layer which is used to symbolise inspected/not inspected objects - I have to reset this join every cycle. 

If anyone else can help, that would be great!

Kevin_McIntyre
New Contributor III

Like you, I've had to create a join layer which is used to symbolise inspected/not inspected objects - I have to reset this join every cycle. 

Could you not create the joined layer as a hosted feature layer and have it only join the most recent record in the inspection table? This would allow you to symbolize based on the most recent inspection date.

The downside to the joined layer is that you can't access the related tables from that layer specifically. What you can do though is have both your joined layer and main asset layer both active on the map. Then, symbolize the joined layer to show which assets need to be inspected. Then I'd disable popups for the joined layer, and make the transparency for the main asset layer 99%. This allows you to select on the symbolized joined layer, but get the popup for the main asset layer. It's a crude approach but has been mentioned other times in this forum and is a workaround for the issue you're describing. 

I agree that ESRI should definitely start to implement more useful asset management features into their products. However, and this is only my opinion, but ArcGIS and AGOL to me has always been a platform that is to be developed upon by the end user to fit their needs instead of it being a total solution out of the box. They have been making things much easier however in terms of asset management with the introduction of Field Maps, which considerably simplifies many workflows and doesn't require you to have 4 different apps on your phone to complete a single workflow.

JonathanMcDougall
Occasional Contributor III

Yes, Field Maps certainly is a move towards a less cluttered app structure - will be interested to see how this develops. I also agree with the "to be developed upon", I'm using ExpBuilder more and more to pull together multiple elements whilst looking towards a more consistent look and feel for our services/end users.

Oh, I've used the join & visibility trick already - works, but could work better.

0 Kudos
ttamba
by
New Contributor III

Hi Kevin,

The steps you described are exactelly what I did in my case. However, this approach is not a panacea. As I mentioned, when the assets are all inspected, we are forced to redo a new join, because we can no longer symbolize a new inspected asset for the new tour without creating a new join between the active layer and the join table.

Kind regards,

0 Kudos
PatrickMcDonald2
New Contributor II

Hi ttamba,

When I created a join between Catch Basin structures and Catch Basin Inspections, I created a symbology based on an Arcade expression rather than a Field.  This way, you don't have to recreate the join for each cycle.  It also allows the field crew to see where they have been, reducing the chance that the same CB gets inspected again, before the cycle resets.

IIf(DateDiff(now(), $feature.InspectionDate, 'years') < 1, "Inspected", "Requires Inspection")

I used 'years' in my case, but you could specify other timeframes (like days, etc.), or even calculations.  I also added a specific symbology to highlight the inspections in the last 12 hours so I can see where the crews are each day. 

A good ESRI tutorial can be found here:
Part 1  https://www.youtube.com/watch?v=v0W6X6ovi_Q
Part 2  https://www.youtube.com/watch?v=gqC-EEw3nxY
Part 3  https://www.youtube.com/watch?v=n3iPkATo9R0
Part 4  https://www.youtube.com/watch?v=wHJLyKica24

Regards,
Patrick

 

ttamba
by
New Contributor III

Hi Patrick,

Thank you very much for your feedback on the question about creating the symbology using Arcade expressions for asset inspection. This is exactly the kind of workflow I was looking for in my case. The practical video resources (tutorials) you referred me to have been of great help to me, as they show the entire process of a common workflow to asset inspection.
Thanks again for your response and the resources! It's very appreciated!
Regards,

 

0 Kudos
PatrickMcDonald2
New Contributor II
Hi ttamba,
You are welcome. I searched for a long time trying to find a way to get
this done, so why not share it with the community. I'm glad it helped you.
0 Kudos