Hello ESRI people,
I am wondering if a database sequence function is acceptable in a batch calculation.
I prepared a batch calculation of which a return is a text value that is concatenated with text values from another layer and also database sequence value. This arcade expression works ok if the database sequence function is not included but if it is included, it will get an error (The code can be verified but cannot save it and Red marker comes up). Confirmed that numbers of output text characters are less than the field length. I don't know if this is because of my code or limitation of the function.
Any advice is much appreciated.
My code:
var fsMAP = FeatureSetByName($datastore, "MAP_A", ["*"])
var fsMAPIntersect = Intersects(fsMAP, $feature)
var fsMAPFirst = First(fsMAPIntersect)
if (fsMAPFirst == null) return {"errormessage": "There is no intersection"}
else if ($feature.MapNumber == null)
return concatenate(["TTTTT", Left(fsMAPFirst.MAP_NO,5),Text(NextSequenceValue("test_seq"), "00000")])
else return $feature.MapNumber