Using calculated expressions in a form, I was able to auto increment a number field in Field Maps using this arcade expression:
if (IsEmpty($feature.ID)) {
var numberlist = FeatureSetByName($map,"ID Sequence")
var topnum = Top(OrderBy(numberlist,'ID DESC'),1)
var counter = Number(Max(topnum,'ID'))
var id = counter+1
return id
}
else {
return $feature.ID
}I also wanted this calculated expression to work while using the editor widget in an Experience Builder app. Other expressions such as this populate correctly in Experience Builder:
var IssuedBy = $feature.issuedby
var Email = When(IssuedBy == 'Admin 1', 'TEST@gmail.com',
IssuedBy == 'Admin 2', 'TEST2@gmail.com', '')
return Email
Is there something wrong with the auto increment expression that isn't allowing it to populate the field, or is this an issue with Experience Builder?
Thanks