I'm trying to write an arcade expression that will grab the last value used in a field and populate that same field on creation of a new record. Also to have the rule only "fire" if the new record and its target field is saved on creation as null.
Basically a "translation" of the Attribute Assistant Method Last_Value into Attribute Rules. I'm assuming there will be some use of loops, but honestly I just need some nudging in the right direction and help on how to construct this expression.
So your last value is a numeric value and when you add a new feature, you want that field to be last value + 1. Is that correct?
If so, my suggestion is to use a data base sequence and start your sequence with the highest current value. You can then add a rule to return the next value of the the sequence.
No, not looking for database sequences. Totally good on that - generating IDs and all.
I'm talking about having a record on, say, a hydrant layer. That I created yesterday. All the fields are populated. And then today I'm adding a new record and I want the Owner field to automatically grab the value of that record I made yesterday. (So, the "last value" that had been entered in that field before my new record).
Appreciate any insights!
Ahhh. I see...
Take a look here ; I see that last value currently does not have an attribute rule counter part.