Auto fill a field based on value of another using Smart Editor Widget

576
4
01-07-2021 09:09 AM
CMcDonald
Occasional Contributor

Hi,

I would like to use the Smart Editor Widget to populate a numeric value into another field based on what is selected in the 'Issue' dropdown pictured below.

Flood_Issue_Dropdown.png

The numeric value would then be inserted into the separate field 1, 2, 3 etc.

Flood_Reported_Risk.png

I thought I could use the new cool functionality within the widget and create a Smart Action with an expression whereby.

Flooding - No Property Risk would have a Reported Risk value of 2

Flooding - Property Risk would have a value of 1

Flood_Smart_Action.png

 The selection from the dropdown would auto fill Reported Risk.

I have tried Attribute Actions > Preset also but you can't build an expression which is what I think I weed need to do in order to allocate the numeric value?

Thankyou

4 Replies
AlixVezina
Esri Contributor

@CMcDonald This option is not supported in the Smart Editor widget.

What you are requesting may be done with Attribute rules. Please review the following article published on 3 January 2021: Introducing smart forms in ArcGIS Field Maps (esri.com)

Near the bottom of the article: 

Attribute rules – are user-defined rules that can be used to automatically populate attributes, restrict invalid edits, and perform quality assurance checks on existing features when they are submitted. Attribute rules are coming to hosted feature services and to forms so that you can execute business logic in your form connected or offline.

Smart forms may provide the capabilities you require moving forward.

CMcDonald
Occasional Contributor

Thanks for the response @AlixVezina and clarifying.

Hopefully this is functionality that can be incorporated into the Smart Editor widget in the future perhaps.

I don't believe ArcGIS Field Maps would be the best overall solution even though it has the functionality I am enquiring about as the operative will be office based and needs to capture the incident onto a map, input attribute information and then maintain that information as the incident progresses through from being reported to finally being closed.

AlixVezina
Esri Contributor

@CMcDonald indeed ArcGIS Field Maps would involve a different workflow than the office-based one you've described. If I am not mistaken, the "smart forms" that are available in Field Maps will also be available in other ArcGIS products. In the article I mentioned above, this is described as follows:

"The form you build with the Field Maps web app is stored within the map. Smart form content is managed in the map so other ArcGIS apps can display the same form editing experience as the Field Maps mobile app." [...] "The first web app to use these forms is the Map Viewer beta – planned for release in 2021. If you add or edit features in the Map Viewer beta, you’ll be presented with the same form that the Field Maps mobile app displays."

If that works out the way it's described in the article, these capabilities should eventually become available in the Map Viewer (beta) and potentially ArcGIS Experience Builder.

 

Of course, that's not an immediate solution to your problem.

I did a bit more research and it appears a similar capability is supported in Survey123. Here's a video (a bit dated) that shows how it works: ArcGIS Survey123: XLSForm – Using Calculations in Your Surveys - Bing video - I assume there's lots more you can do today, please see related doc: Formulas—ArcGIS Survey123 | Documentation

I think you would need to use Survey123 Connect to build your form and leverage the formulas.

Survey123 forms can be used in a desktop browser and are also part of Experience Builder if you would like to display the web map and the survey into one app: Survey widget—ArcGIS Experience Builder | Documentation

 

CMcDonald
Occasional Contributor

Hi @AlixVezina

A lot of really useful information there, this may end up being the best approach and so I'll need to set some time aside and do some testing.

Thanks 👍