Default Value for non-Hosted Feature Service

640
4
Jump to solution
11-14-2022 10:35 AM
ccowin_odfw
Occasional Contributor

Hello,

So I have a bunch of feature classes for animal observations and folks do surveys and use Field Maps to collect a point for whatever animal they see and enter some data about it. The feature class is ultimately on an ArcGIS Server in an Enterprise Geodatabase so it is not a hosted feature service so I can't set the template within the Field Maps web app.

In the Enterprise Geodatabase, the default values are set for two fields that 95% of the time stay as the default value. I tried doing an arcade expression but that makes it impossible to edit the field at all. So I was wondering if anyone had a workaround to applying default values to a non-hosted feature service?

 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ccowin_odfw
Occasional Contributor

YES! With some help from ESRI Support we were able to figure it out. And once I did this workflow once I have not had to do it again. I work in Pro primarily but imagine a lot of the same windows exist in Desktop too.

Click Manage Templates under Edit Ribbon.

 ccowin_odfw_0-1689191154286.png

Select the feature and go to properties. Then in the properties window select attributes:

ccowin_odfw_1-1689191269177.png

 

As you can see from my example the Default value is Collar with a 0 to indicate that the animal doesn't have a collar which applies to 99% of rows. What I had to do was just use that text field, enter in a space and then delete the space. Then overwrite the feature service on the server and double check that the default value is appearing in field maps.

No idea why it works like this, but it solved my specific problem! Let me know if you have any questions.

View solution in original post

4 Replies
RyanUthoff
Occasional Contributor III

I'd recommend setting default values at the database level instead of the feature service level. You're able to set default values for feature classes within ArcMap/ArcGIS Pro.

0 Kudos
ccowin_odfw
Occasional Contributor

Thanks for the reply, they are already set up with default values within the Geodatabase. The default values do not show up in Field Maps.

0 Kudos
Stacey_Crowe
MVP

Hi did you ever get an answer to this question?  Running into the same issue.

0 Kudos
ccowin_odfw
Occasional Contributor

YES! With some help from ESRI Support we were able to figure it out. And once I did this workflow once I have not had to do it again. I work in Pro primarily but imagine a lot of the same windows exist in Desktop too.

Click Manage Templates under Edit Ribbon.

 ccowin_odfw_0-1689191154286.png

Select the feature and go to properties. Then in the properties window select attributes:

ccowin_odfw_1-1689191269177.png

 

As you can see from my example the Default value is Collar with a 0 to indicate that the animal doesn't have a collar which applies to 99% of rows. What I had to do was just use that text field, enter in a space and then delete the space. Then overwrite the feature service on the server and double check that the default value is appearing in field maps.

No idea why it works like this, but it solved my specific problem! Let me know if you have any questions.