Adding custom business logic to Field Maps

550
11
11-03-2023 11:41 AM
BrianBulla
Occasional Contributor III

Hi,

I'm just wondering if it's possible to add any logic to field maps.  For example, we have features that get yearly inspections so we have a related INSPECTION table to the feature.  Each time an inspection happens:

- if this, this and this come up in the inspection, then the STATUS field on the feature needs to be INSPECTED

- or if this, this and this come up in the inspection, then the STATUS field on the feature needs to be WORK REQUIRED

- etc.

Basically, we need to update fields on the feature, based on what fields are filled out on the inspection form.  Is it possible to do this??

Currently we are look at VertiGIS Mobile, since it seems to be impossible to get FieldMaps to do this, but I would much prefer to stick with FieldMaps.

0 Kudos
11 Replies
KPyne
by
Occasional Contributor

You cannot perform edits on features outside of the Field Map form (as far as I am aware).

However, I do this exact workflow using Field Maps and webhooks. When our related tables are edited (or created) a webhook trigger pushes an update to the related parent feature. It is not the most straightforward process and I wish Field Maps supported editing parent records out of the box but it is functional for now.

ESRI has a decent guide here

0 Kudos
BrianBulla
Occasional Contributor III

Great....thanks @KPyne .  I never even thought of that.  At the Dev Summit I talked to some esri guys about possibly using attribute rules for this but not sure if Field Maps supports that yet or not.

I'll check out that link.

Thanks!!

0 Kudos
KPyne
by
Occasional Contributor

So I think your right about Attribute Rules, but it has to be in an Enterprise/Portal environment (and always connected)? - don't quote me on that, hopefully someone can chime in.

gis_KIWI4
Occasional Contributor

@KPyne  is right. Attribute rules won't help unless we are talking about desktop (ArcGIS Pro) / Enterprise environment. We have struggled with this exact problem too.

The updates in the related table do not trigger a calculated expression in the parent table.
We use FME to write the calculated result back into the parent table.

0 Kudos
BrianBulla
Occasional Contributor III

Back sometime in the summer some folks from esri did a Webinar on FieldMaps and mentioned how the Attribute Rules functionality was in an upcoming release.  They were a little fuzzy on details though like working when disconnected, etc.

With the webhooks what sort of issues have you come across?  What sort of backend setup do you need for it to work properly?  I believe we are still at Enterprise 10.8, and I was hoping to get this to work in our Portal, not AGOL.

0 Kudos
KPyne
by
Occasional Contributor

I am pretty sure webhooks are possible in Portal - but I do not know the pros/cons and only have experience setting them up in AGOL.

Once they are setup we use Make.com or Power Automate to build triggers against them

BrianBulla
Occasional Contributor III

I've setup a Make.com account, so just working through the tutorial.  Thanks for your help with this!

0 Kudos
BrianBulla
Occasional Contributor III

Hi....so I'm just working through the webhooks sample in the blog.  From what I'm reading, as soon as I enable the Editing tracking on the FeatureService, I should be able to see the "WebHooks" option when viewing the feature services URL.....but I don't see that.  Can anyone explain how to get "WebHooks" enabled on the feature service??

BrianBulla_0-1699365826738.png

I'm going through the tutorial here:  https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/use-webhooks-to-automate-workflo...

 

0 Kudos
KPyne
by
Occasional Contributor

You are close. You have to open that page in Admin mode, which ESRI added a convenient button for at the top right of the page. Should just be able to click it and it will refresh the page