Update attributes based on input of one data entry field

420
5
01-31-2022 01:12 PM
brian_terraformation
New Contributor II

I have a domain/list set up for data collection in AGOL and using the Field Maps app for data collection.  When planting a new plant or documenting an existing one, our field staff will select the species from the dropdown menu.  Our aim is to keep data collection in the field as easy as possible for field staff and reduce the potential for data entry errors.  There are multiple attributes that relate to the species they select.  We have this species information stored in a separate, non-spatial table.  I would like for the hosted feature layer to reference this non-spatial data and fill in the related attributes.

I have thought of and seen some workflows, but they would require the feature layer to be re-published.  I do not believe that would work with our offline data collection workflow.  Re-downloading the offline map every time is not an option.  Please do tell me if I am mistaken in that assumption.

In databases and spreadsheets, it is a pretty simple lookup command.  Survey123 has the pulldata command.  I feel like I am overlooking something here, as I haven't been able to figure it out in AGOL or ArcGIS Pro.  While manual editing in ArcGIS Pro is simple enough, the longer process to select each species and use the field calculator is not as efficient as I believe it should be, especially for ongoing data collection.  And before I go too far down developing one method or other, will Model Builder or Python be my best path forward?  The best solution would be a readily available workflow that I have overlooked.

Thank you!

5 Replies
ABishop
MVP Regular Contributor

Hello Brian,

It sounds like you need to build domains for your database and feature class/service. Also, may need to consider your GIS infrastructure and update needs before scripting the update process.

I found this link about managing domains... hope it helps.

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/create-modify-and-delete-do... 

Amanda Bishop, GISP
0 Kudos
brian_terraformation
New Contributor II

Thank you Amanda, as you can see at the start of my post, domains are set up for this species field as well as other fields in the feature class.  Is there something I am missing within domains that you can set them up in a way that populates other fields when making your data entry choice?  I had not realized this before, but when I think about it, within domains would be a logical way to set this up.  I imagine it could be similar to attribute rules, maybe even within them, but I do not see where this workflow can be set up.

0 Kudos
ABishop
MVP Regular Contributor

Hello Brian,

Yes, you can set up attribute rules to populate data based on another field or feature class.  Below is a link to an attribute rule script expression examples:

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expre... 

Amanda Bishop, GISP
brian_terraformation
New Contributor II

Thank you Amanda!  This sets me on the right path.  Hopefully I can do this successfully.  The link even lists examples of what is possible in a geodatabase.  In my case, this one is appropriate:

"When a pipe's LifeCycleStatus attribute is updated to Abandoned, the PressureZone attribute is updated to None."

It would have been nice if they included this in their detailed examples, but I think the Esri tools will be easy enough.

I will come back to this and Accept as Solution once I am able to successfully complete this.  Otherwise I will come back and ask for further assistance.

Thank you again,

Brian

0 Kudos
brian_terraformation
New Contributor II

This is looking to be beyond my capabilities.  Any code examples for this would be appreciated.  Maybe even without accessing or joining a separate table and keeping it simply within the feature class.  Even a simpler expression that states, "if species = x, then type = y" would be helpful to understanding Arcade scripting better.  Thank you.

0 Kudos