Field maps: make attachments mandatory (required as other fields)

6456
26
11-06-2022 11:20 PM
schenardi
Regular Contributor

During inspections and field map collection it might be mandatory to collect an image of the infrastructure.

The idea is to configure that at least one attachment is required. 

It must be possible to pre-create points to be inspected with already existing informations (geometry, label etc). Mobile worker in the field fills the other missing fields (required) and takes at least one picture. 

 

There could be a workaround which currently doesn't work (count the number of attachments, write it into a field and make it required).

https://community.esri.com/t5/arcgis-field-maps-questions/count-number-of-collected-attachments-in-f...

26 Comments
MarkusSchenardi

An SOI as proposed by @CoreyLunty1 does not solve the problem. Why? Features and attachments are separate objects in a featureclass and a table; connected with a relation.  That's why the process has two steps: Create a feature in a featureclass and then create the attachment in the table. That's probably the reason why Esri does not take this improvement into consideration because this existing mechano is difficult to change. If you enforce the attachment as mandatory you must store both objects in one step which is currently not the case in all apps and probably difficult to handle, especially when one of both objects cannot be stored for whatever reason. It needs a more sophisticated handling of creation-processes with a kind of wizard-like guidance and a save at the end.

 

In fact it might need a re-engineering of the whole attachment handling to enable such use cases. The same case by the way for other related items that have mandatory 1 to many relations (and 1 to 0 is from a business perspetive not allowed).

 

Nevertheless, keep voting and thanks for all the positive feedbacks.

 
CoreyLunty1
I definitely have it working here, though it may not be possible in other
environments.

Case 1:
New feature with attachment

See the below example. The applyEdits payload will include an 'add' for the
feature, and also a record in attachments.adds. GlobalIDs are already
generated at this stage, at least in this case cause 'useGlobalIds' is true
on my service.

https://developers.arcgis.com/rest/services-reference/enterprise/apply-edits-feature-service/#exampl...

Case 2:
Update existing feature

This is more complicated. Attributes may have changed on the feature
(which could change if this specific instance of the feature should have
mandatory attachments), plus any existing attachments previously
submitted will not be in the applyEdits payload .

In 'updates' cases, we need to query our geodatabase to check the feature's
table as well as the __ATTACH table, to see if there are already images
attached.


PaulPetersen1

This is an absolutely essential/needed feature, along with adding inline related records (with requirements). The photos and related record workflows are the main drivers that force us into Survey123...when I'd prefer to keep everything in one app.

Debert
by

Are you unable to specify the attachment attribute field to be required in Field Maps Designer?

nate0102

required

AaronMannIFS

Coming across this need right now! This would be a game changer!