Can a field participate in multiple groups in a Field Maps smart form?

938
2
Jump to solution
11-09-2021 05:42 PM
BrianOevermann
Occasional Contributor III

I have a related table for tracking different water service connection activities. I've created all of the possible fields in the table that might be populated for at least one of these activities. Many of these activities have one or more fields in common across all of the activities.

I want to create groups of fields containing the relevant fields for each activity and ultimately use conditional visibility to display that group based on the work activity selected. However, I cannot seem to find a way to "duplicate" a field in the table into multiple groups.

To use a generic example, I have a field called 'Notes' to capture any miscellaneous info the user might need to add. This field needs to be a part of the field list for every work activity (so, every group created). Is there a way to include the 'Notes' field in every group (or in the case of other fields, some but not all groups)?

I would hate to resort to creating individual fields (NotesForActivity1, NotesForActivity2, etc.). How have others handled this situation? I'm sure I am not the first with this requirement.

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

This is an interesting question and requirement. Field Maps and forms in general do not support referencing a field multiple times in the form. It may be worth adding an Idea to gauge any other interest in this.

To solve your problem today, I think you may need to consider not using conditional visibility with groups and instead apply the conditional visibility expressions to the field elements individually. You can re-use/reference expressions so it shouldn't be many more expressions to write.

For fields like notes, the expression may be a little more complex so that the field appears when any one of a set of values is matched (e.g. Includes(['activity1', 'activity2', 'activity3'], $feature["activity_type"]). So in this case the notes field would be visible if the activity_type was activity1, activity2, or activity3 but not any other value.

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

This is an interesting question and requirement. Field Maps and forms in general do not support referencing a field multiple times in the form. It may be worth adding an Idea to gauge any other interest in this.

To solve your problem today, I think you may need to consider not using conditional visibility with groups and instead apply the conditional visibility expressions to the field elements individually. You can re-use/reference expressions so it shouldn't be many more expressions to write.

For fields like notes, the expression may be a little more complex so that the field appears when any one of a set of values is matched (e.g. Includes(['activity1', 'activity2', 'activity3'], $feature["activity_type"]). So in this case the notes field would be visible if the activity_type was activity1, activity2, or activity3 but not any other value.

0 Kudos
BrianOevermann
Occasional Contributor III

Thank you @Anonymous User. That use case is centered primarily around the idea of best practice design to not have multiple fields for essentially the piece of information. The Notes field example is a classic case.  We often add a Notes or Comments field to feature classes or tables to capture the non-standard, free-form info needed to help explain a particular issue/situation ("Did not inspect. Angry hedgehog has a burrow adjacent to facility." *Not a real note!)

Your Includes() function solution appeared to be a reasonable alternative, so I dove into the Smart Form to implement it. That is when I noticed that the Includes() function wasn't in the list in the Arcade Editor. Hmm. Diving into help there was a link to the version matrix, where I found that this function isn't available until the 10.9 release--and we are on Enterprise 10.8.1.

Before posting my question I came across a post that used the IndexOf() function. It appears to do something similar so I looked further into it. In the end, I was able to make the IndexOf() function work for my purpose.

For others' benefit, this is my syntax for the Notes field, which needs to appear for every activity in my domain list:

IndexOf(['Register Replacement','Radio (MXU) Replacement','Meter Install','Meter Replacement','Meter Removal','Other'],DomainName($feature,"WorkType")) >= 0

Note: You use the domain's description and not the code for the list.

My Smart Form is now working exactly how I need it to function! I believe the Includes() function would have worked well had I already been using 10.9.

Now my only outstanding issue is that I get an "Unable to Submit, Unable to complete operation." error when I attempt to submit my form within Field Maps. Hopefully I can track down the cause of that soon.

0 Kudos