Select to view content in your preferred language

How to remove values filtered out in layer view from the edit form

568
7
Jump to solution
06-08-2026 06:56 AM
MollyE
by
Frequent Contributor

I have a view layer in a map that is filter to only show the TYPE values of "General", "Proposed" and "Approved", but the root layer also has "SUGC" and "Brainstorming" in the domain. When the edit form appears, it does only show the values I want to see, however once a user selections an option and starts to create a feature (or edits one already made), they are able to select the options that are filtered out from the view, which results in the feature disappearing from their map.

Is there a way to mitigate this? I have only the values I want them to be able to choose from in the template as well.

Comment Types 01.png

Comment Types 02.png

0 Kudos
1 Solution

Accepted Solutions
EMani
by Esri Contributor
Esri Contributor

Hi @MollyE 

In ArcGIS Pro, you will need to create a new field in your source layer (I named it TYPECALC)

Create a domain for this field with only the 3 TYPEs you require.

EMani_0-1781009329469.png

Then populate it from the TYPE field with a calculated field expression.

var t = DomainName($feature, "TYPE");

IIf(
    t == 'General' || 
    t == 'Proposed' || 
    t == 'Approved',
    t,
    null
)
 
Publish to ArcGIS Online or Overwrite your layer.
 
In your View settings:
Filter to the 3 fields, so you don't see Null values (or filter to is not Null)
EMani_1-1781010538099.png

Include both fields:

This ensures the TYPE field is also updated when TYPE CALC is edited (You will hide the TYPE field)

EMani_2-1781010577449.png

 

In the maps that use the source layer:

Add your TYPE field as usual.

In Configure forms, make a form field for TYPECALC that is not editable, not visible, and has an Arcade expression.

EMani_3-1781010780883.png
IIf(
  $feature.TYPE == "1" || $feature.TYPE == "2" || $feature.TYPE == "3",
  $feature.TYPE,
  null
);

This ensures TYPECALC is not editable from the source layer.

In the map that uses the View layer:

Hide the TYPE field:

EMani_4-1781011008240.png

In Configure forms:

Add your TYPECALC field as usual.

Make a TYPE field not editable or visible.

EMani_5-1781011114433.png

This time, the expression is simply:

$feature.TYPECALC

This ensures all the edits in the view are also saved to the TYPE field in the source layer.

Now, when you edit the View, only the 3 domains are listed.  

EMani_6-1781012655014.png

(view in My Videos)

(I can't seem to get the video to play, but I can still scroll through it)

If you have any questions, let me know.

View solution in original post

7 Replies
EmilyGeo
Esri Regular Contributor

Hi @MollyE

Could you try making that field not editable in the form? 

EmilyGeo_0-1780957373938.png

 

0 Kudos
MollyE
by
Frequent Contributor

It is editable, the user needs to be able to change it (as it may go from 'pending' to 'approved') I just do not want the other options visible to these particular users. Is that possible?

0 Kudos
EmilyGeo
Esri Regular Contributor

Hi @MollyE , 

There isn't really a way to conditionally show options in the list to users. But, depending on your needs, and the data structure, there are some other ways to approach this. 

For example, if you are the layer owner or admin, you could create a new field - that contains only the values you want editors to see, and use that field in the form instead of the original field. 

0 Kudos
MollyE
by
Frequent Contributor

It is a layer used by different users to make comments about spaces and their use. We want some users only have access to see certain comments (general, pending and approved) and other users to have access to all of them, including those made in space planning meetings. As of right now, they can't see any other comments, which is what we want, I just worry if they choose the incorrect type then their comment will disappear for them and they cannot correct it. 

0 Kudos
EMani
by Esri Contributor
Esri Contributor

Hi @MollyE 

In ArcGIS Pro, you will need to create a new field in your source layer (I named it TYPECALC)

Create a domain for this field with only the 3 TYPEs you require.

EMani_0-1781009329469.png

Then populate it from the TYPE field with a calculated field expression.

var t = DomainName($feature, "TYPE");

IIf(
    t == 'General' || 
    t == 'Proposed' || 
    t == 'Approved',
    t,
    null
)
 
Publish to ArcGIS Online or Overwrite your layer.
 
In your View settings:
Filter to the 3 fields, so you don't see Null values (or filter to is not Null)
EMani_1-1781010538099.png

Include both fields:

This ensures the TYPE field is also updated when TYPE CALC is edited (You will hide the TYPE field)

EMani_2-1781010577449.png

 

In the maps that use the source layer:

Add your TYPE field as usual.

In Configure forms, make a form field for TYPECALC that is not editable, not visible, and has an Arcade expression.

EMani_3-1781010780883.png
IIf(
  $feature.TYPE == "1" || $feature.TYPE == "2" || $feature.TYPE == "3",
  $feature.TYPE,
  null
);

This ensures TYPECALC is not editable from the source layer.

In the map that uses the View layer:

Hide the TYPE field:

EMani_4-1781011008240.png

In Configure forms:

Add your TYPECALC field as usual.

Make a TYPE field not editable or visible.

EMani_5-1781011114433.png

This time, the expression is simply:

$feature.TYPECALC

This ensures all the edits in the view are also saved to the TYPE field in the source layer.

Now, when you edit the View, only the 3 domains are listed.  

EMani_6-1781012655014.png

(view in My Videos)

(I can't seem to get the video to play, but I can still scroll through it)

If you have any questions, let me know.

MollyE
by
Frequent Contributor

Wow, thank you @EMani. This worked great! I really appreciate you taking the time to make such a detailed explanation. 

EMani
by Esri Contributor
Esri Contributor

You are very welcome @MollyE 

It took me a while to figure out, but I learned a lot along the way, and it was a fun challenge!