Select to view content in your preferred language

Calculated default value in hosted feature layer

325
5
02-10-2026 07:55 AM
Status: Open
Bud
by
Legendary Contributor

It would be great if we could set up a calculated default value for a given field in a hosted feature layer, since it's hard or impossible to change existing default values.

For example:

  • sysyear
  • sysyear + 1

Related comment from @L77  in Allow Default Value to be removed or changed in Hosted Feature Service Field View

5 Comments
ToddW_stl

@Bud  - I have a simple hosted feature service that I was able to change the default value of a simple Yes/No question by editing the feature template.  Note I did not sync the template with the layer style and was able to save the new default value.  This idea still may be valid, if the desire is to use Arcade expressions to calculate default values, but I wanted to provide a potential workaround to help people in the meantime. 

ToddW_stl_0-1770742027752.png

ToddW_stl_0-1770742140449.png

 

EmilyGeo

Hi @Bud

you can calculate a value for a field by setting up an arcade expression in the form. Is that what you are looking to do? 

 

Bud
by

@EmilyGeo I'm looking to set the global default value in the feature layer settings in the Content tab.

EmilyGeo

Hi @Bud

thanks for clarifying and for sharing your idea. You're right, the default value is not editable on the data tab. For now, the best workarounds are to configure templates and/or forms to set or calculate values for new features. 

Bud
by

I noticed @KAnderson recently upvoted this idea. You might like this post: 

https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feat...

Not sure what kind of default value you want to set up. But you might be able to use the Admin REST API for it.