I have a project that I created in the previous version of ArcGIS Pro, but after updating to 2.2 it does not visualize the symbology based on Arcade. Perhaps a glitch I thought so I created a new project, added the featureclass and defined Unique Values and created the expression based on a script I have used before (see: Visualizar el esquema de barrido y el próximo barrido en una ventana emergente con Arcade ).
Arcade expression:
var dct_schedule = {'L-J': [0, 3], 'M-V': [1, 4], 'W-S': [2, 5], 'LWV': [0, 2, 4], 'MJS': [1, 3, 5], 'LaS': [0, 1, 2, 3, 4, 5]};
var lst_schedule = dct_schedule[$feature.FRECUENCIA];
var resultado = 'Otro día';
var dia_actual = Weekday(Now()) -1;
var test = IndexOf(lst_schedule, dia_actual);
if (test != -1) {
resultado = 'Barrido hoy';
} else {
resultado = 'Barrido otro día';
}
return resultado;
When I validate the expression it validates OK:
However, when I apply the expression this happens:
I notice that the buttons present in the Symbology pane have changed, but did something change to the underlying support for Arcade expressions?
CC Kory Kramer
Solved! Go to Solution.
We've checked and this is fixed in ArcGIS Pro 2.3 which should be available in late January/early February.
I have the same problem with this Arcade expression:
var prilohy = $feature.Prilohy
var okna = $feature.Okna_menena
var pnull = IsEmpty(prilohy)
var onull = IsEmpty(okna)
when (((prilohy==0||pnull==true) && (okna==0||onull==true)),"bez",(prilohy==1 && (okna==0||onull==true)),"Budova s přílohami",((prilohy==0||pnull==true) && okna==1),"Budova s realizovanými IPHO",(prilohy==1 && okna==1),"Budova s přílohami a realizovanými IPHO","nic1")
I have a similar problem, getting the same warning message and no way to set the symbolgy. Any update on this?
Nope, same behavior in ArcGIS Pro 2.2.2 still returning the same error. Expression is valid:
However, it will not load the values from the expression:
Kory Kramer , if you want I can send you the data to reproduce this. It works correctly in ArcGIS Online.
Hi Xander Bakker.
Sure. It would be good to get an example that fails. Interestingly, I just found this bug:
[BUG-000117086: Error received when trying symbolize a feature layer using custom symbology through an arcade expression in ArcGIS Pro when the machine region format settings are Swedish(Sweden) .]
For those on this thread, are you on Windows 7 or Windows 10?
What are the region and language settings?
Cheers
Hi Kory Kramer , thanks for digging into this.
Although I am a huge fan of the Swedish cook of the muppets...
...my regional settings are actually Spanish (Colombia) and I'm using Windows 10 Pro. I'll mail you the data and expression that I am using.
That's hilarious, Xander Bakker! Here is my hunch - the bug was written to be too specific. This could be the case with any region/language setting other than English. We'll need to investigate.
Thank KKramer-esristaff , I just sent you a mail with the data and the expression and an example of how it looks in ArcGIS Online.
Xander Bakker I set my country to Colombia and default language to Espanol (Colombia) and the expression works fine in ArcGIS Pro 2.2.2.
So it doesn't seem that it is just ArcGIS Pro 2.2.x, but something else about the machine, combined with 2.2.x that leads to this.
Hi Kory Kramer , thanks for testing! I wonder what the problem could be. This happened also in my machine at 2.2.1 (and perhaps even in 2.2 if I recall correctly). I will test it out at home where I have a Dutch OS to see if that gives a different result and with some colleagues at the office to see if using a different computer makes a difference. What else can you recommend me to test?