Select to view content in your preferred language

Setting Default Values to Variables

1368
3
07-09-2019 11:16 AM
TylerVeinot2
Emerging Contributor

Hi All;

Still new to ArcPro and have been using QGIS so forgive me if I am missing an obvious answer here.

I am trying to set certain fields in a feature class to a variable so that when they are filled out in Collector the data collector doesn't have to fill out things like "User Name" and "Edit Data" every time and I cannot figure out how to do this. In QGIS if I set a fields default value to SQL and "now()" When a new feature is created that field will auto populate with the current datatime stamp. Also @user_account_name or @user_full_name as a default will auto populate those fields with the user name or user's full name in those fields.

Is there a way to do that in ArcPro for feature classes? Do the same variables work? Is there a list of default value variables for Esri products?

Thanks;

Tyler

0 Kudos
3 Replies
TylerVeinot2
Emerging Contributor

Thanks for the reply, it looks like I need to do this through attribute rules and got it working for the datetime stamps but I cannot find a way to pull the current user and plug that variable into the user field. Is there a list of common use variables for field expressions? 

0 Kudos
KoryKramer
Esri Community Moderator

Since you're working with a service in Collector, it sounds like you're looking for the built-in functionality of keeping track of who is editing.  Check out https://doc.arcgis.com/en/arcgis-online/manage-data/manage-hosted-feature-layers.htm#ESRI_SECTION1_0...