Select to view content in your preferred language

Autopopulate field in Field Maps with Arcade (TextFieldDomain + Sequential Number)

167
1
a week ago
IFIGIS
by
New Contributor

I need to automate population of a field in Field Maps (setup up in Field Maps Designer).

1. I have one field (Unit_Type) that is populated by a user, they choose A, B, or, C from a list.

2. I need a new field (Channel_Unit_Type "CUT") to be autopopulated with the Unit_Type + sequential numbers. That complicated part for me is that each Unit_Type has its own series of sequential numbers. (A1, A2, B1, B2, A3, C1, C2, B3, B4, C3, A4, etc).

This Arcade code gets you Sequential Numbers. I don't know where to go from here.

var numberlist = FeatureSetByName($map,"<layer_name>")

var topnum = Top(OrderBy(numberlist,'<field_name> DESC'),1)

var counter = Number(Max(topnum,'<field_name>'))

var id = counter+1

0 Kudos
1 Reply
RhettZufelt
MVP Notable Contributor

When entering code, best to use the code formatting.

See this post for one way to accomplish your goal.

R_

 

0 Kudos