Select to view content in your preferred language

Arcade working on web map, but not in FM

111
0
a week ago
CristianGraf
Emerging Contributor

Hello, 

Im trying to populate a field with sequentials numbers. This sequence it's grouped by an unique number (AKA Project Number). For any group of unique project number, it will create a sequential number 1 to X.

CODE
 _________________________________________________________________________________________________
if(IsEmpty($feature["POLE_NUMBER"]) || ($feature["POLE_NUMBER"])==0){
var np_1= null
if(IsEmpty($feature["numero_projet_correction"])){
np_1=$feature["numero_projet"]}
else {
$feature["numero_projet_correction"]}
var numberlist = FeatureSetByName($map,"Poteau (Lien Survey123)")
var num_proj = Filter(numberlist, "numero_projet = '" + np_1 + "'")
var num_proj_corr = Filter(numberlist, "numero_projet_correction = '" + np_1 + "'")
var counter = Count(num_proj)
var counter_corr = Count(num_proj_corr)
var id = counter+counter_corr+1

return id
}
else {
//Return existing value if null or different of 0
return $feature["POLE_NUMBER"]
}
__________________________________________________________________________________________________
 
I did try several versions, but I have always the same results...

Any suggestion?


 
Thank you so mutch!!!

 

0 Kudos
0 Replies