Select to view content in your preferred language

Field Maps, Minimum file count still required when media not relevant - workaround to required attachments?

131
7
Jump to solution
Monday
TL2
by
Frequent Contributor

I am trying to make an attachment required if a condition is met.  When I set a condition and a minimum file count it still requires the attachment even when the attachment item is hidden (condition not met).

Is there a way to require attachments based on a condition?

0 Kudos
1 Solution

Accepted Solutions
bbollin
Esri Contributor

Ok, thanks @TL2 for sending the repro data. From looking at the webmap you were using an editable expression on the attachment form element AND had a requirement of 1 attachment. To only enforce an attachment submission when a certain value is entered in a different field, you should use a visibility expression on the attachment element.

So the setup will be

  1. Attachment element requirement = 1
  2. Visibility expression on the attachment element to only show when Desired_Field = Desired_Answer

The requirement is only enforced when the element is visible. Hope this helps!

View solution in original post

0 Kudos
7 Replies
ToddW_stl
Esri Contributor

I'm not seeing this issue in ArcGIS Online (organizational account).  When I set my "attachment_required" question to "No", I am allowed to submit without an attachment.  When I select "Yes", my attachment question becomes visible, and required (min set to 1).  When I try to submit "Yes" without and attachment, i get an error (as expected).  My "Editable" and "Visible" Arcade expressions are the same for the attachment question.

ToddW_stl_0-1783387735610.png


20260707_012759346_iOS.png

ToddW_stl_1-1783387850256.png

 

 

0 Kudos
TL2
by
Frequent Contributor

I am not able to reproduce this.  Actually, when I try it will not work in the Map Viewer and in Field Maps I get an error - "The form contains unsupported data."

0 Kudos
ToddW_stl
Esri Contributor

are you attempting to edit a view?  have you tried with a new, simplified test version of the map and form, maybe just isolate the layer and add a form with the conditional question(s) and attachment question?

0 Kudos
TL2
by
Frequent Contributor

Yes , I created a new HFS with one field - required.  I placed the rule for Edit and Visible on both.  I set my domain values (yes,no).  I have the latest version of Field Maps.  I will open a ticket with ESRI.

ToddW_stl
Esri Contributor

please post a case/bug number and any other information you find out for others that may see similar issues!

0 Kudos
bbollin
Esri Contributor

@TL2 Can you send a screenshot of your form authoring settings? Do you have the media input set to Capture only? Also, if you are able to share the data with me/make it public please DM me and the team can investigate this further

0 Kudos
bbollin
Esri Contributor

Ok, thanks @TL2 for sending the repro data. From looking at the webmap you were using an editable expression on the attachment form element AND had a requirement of 1 attachment. To only enforce an attachment submission when a certain value is entered in a different field, you should use a visibility expression on the attachment element.

So the setup will be

  1. Attachment element requirement = 1
  2. Visibility expression on the attachment element to only show when Desired_Field = Desired_Answer

The requirement is only enforced when the element is visible. Hope this helps!

0 Kudos