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.
Solved! Go to Solution.
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.
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
)Include both fields:
This ensures the TYPE field is also updated when TYPE CALC is edited (You will hide the TYPE field)
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.
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:
In Configure forms:
Add your TYPECALC field as usual.
Make a TYPE field not editable or visible.
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.
(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.
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?
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.
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.
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.
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
)Include both fields:
This ensures the TYPE field is also updated when TYPE CALC is edited (You will hide the TYPE field)
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.
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:
In Configure forms:
Add your TYPECALC field as usual.
Make a TYPE field not editable or visible.
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.
(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.