Hello everyone,
I am using Smaprt Editors with WAB in Portal.
I am looking for a way to populate a field with the value "No", before the editors starts editing.
Also I would like to disable edits in this same field and predefide its value to "No".
How can I do that?
Thanks
Vincent,
I assume you may've added the new field and its default value through ArcGIS Pro? I think what's happening is that the feature template attribute is missing in your service's JSON and so the values are not coming through, and same issue with the presets. This is a known bug right now.
A workaround for this is to update the feature's edit templates in the web map - which should add the template back into the JSON and resolve the issues.
For example here is a sample layer where my new field added through Pro is missing in the template attributes (see on the right):
In your web map you will need to manage the feature templates for that layer.
And then just click "SAVE CHANGES" at the bottom (even if you haven't made any changes in the map). The template will be written into the JSON and the value will come through in Smart Editor.
Thank you very much!
Hi @JoseSanchez,
Thank you for your question.
I am looking for a way to populate a field with the value "No", before the editors starts editing.
In the Attribute Actions section of the Smart Editor widget configuration, you will be able to set Presets to achieve this: Preset Attribute Actions
Also I would like to disable edits in this same field and predefine its value to "No".
In the Smart Actions section of the Smart Editor widget configuration, you will be able to set a new expression to achieve this: Smart Actions
There are some example for this functionality in this video: Get Smart About Editing - Configure a Data Collection Form
@AlixVezina I am having the same issue using WAB for Portal 10.9.1. I set an 'Attribute Action Preset' so the status field of a Feature Service should be 'Reported' (which is a domain value). However this fails to populate the field when the Smart Editor dialog opens.
@ahargreaves_FW I believe this may be the same issue we recently fixed in a later version of the Smart Editor widget. First, please try the steps I've provided here, these should also help with resolving this issue.