Select to view content in your preferred language

Arcade pop-up expression creating error in Field Maps

93
1
Tuesday
Labels (1)
JCooley_ClackamasSWCD
Occasional Contributor
We have been using the following Arcade expression to create a short summary for a pop-up in Field Maps.  We are now getting an error message when we try to view the selected feature's pop-up in Field Maps.  The arcade expression has worked for over 2 years with no issues until now. 
 
Error message in field maps:

Expression Name: expr0
Expression Title: Tank mix, weather, applicators
Error Domain: ArcGIS.InvalidCallError
Error Code: 1
Error Description: The operation couldn’t be completed. (ArcGIS.InvalidCallError error 1.)

 

 Arcade expression (expr0):
//Applicator and ist list start
if($feature.Control_Method =="Chemical")
if ($feature.Applicator!=null) Var Appl =  "Applicator and Ist info: "+Trim($feature.Applicator) + ', '
if ($feature.License_2!=null) Var ist2 = Trim($feature.License_2) + ', '
if ($feature.License_3!=null)var ist3 = Trim($feature.License_3)+ ', '
if ($feature.License_4!=null)var ist4 = Trim($feature.License_4)+ ', '
if ($feature.License_5!=null)var ist5 = Trim($feature.License_5)+ ', '
if ($feature.License_6!=null)var ist6 = Trim($feature.License_6)+ ', '
if ($feature.License_7!=null)var ist7 = Trim($feature.License_7)+ ', '
if ($feature.License_8!=null)var ist8 = Trim($feature.License_8)+ ', '
if ($feature.License_9!=null)var ist9 = Trim($feature.License_9)+ ', '
if ($feature.License_10!=null)var ist10 = Trim($feature.License_10)+ ', '
if ($feature.License_11!=null)var ist11 = Trim($feature.License_11)+ ', '
if ($feature.License_12!=null)var ist12 = Trim($feature.License_12)+ ', '
if ($feature.License_13!=null)var ist13 = Trim($feature.License_13)+ ', '
if ($feature.License_14!=null)var ist14 = Trim($feature.License_14)+ ', '
if ($feature.License_15!=null)var ist15 = Trim($feature.License_15)+ ', '

var Applist =  Appl + ist2 + ist3 + ist4 + ist5 + ist6 + ist7 + ist8+ ist9 + ist10 + ist11 + ist12 +ist13 + ist14 + ist15
//Applicator and ist list end

//carrier info start
if ($feature.Carrier_Type!=null) Var C3 = Text($feature.Carrier_Type) + ', ';
if ($feature.Carrier_Amount!=null) Var CA3 = Text($feature.Carrier_Amount, '#.00');
if ($feature.Carrier_Amount!=null) var CU3 = Text($feature.Carrier_Unit) + ', ';
//carrier info end

//Product info start
if ($feature.Product1!=null) Var P1 = Text($feature.Product1) + ', ';
if ($feature.Product1_Amount!=null) Var PA1 = Text($feature.Product1_Amount, '#.00');
if ($feature.Product1_Amount!=null) var PU1 = Text($feature.Product1_Unit) + ', ';
if ($feature.Product1_Concentration!=null) var PC1 = 'v/v: ' + Text($feature.Product1_Concentration, '##.00')+ '%, ';

if ($feature.Product2!=null) Var P2 = Text($feature.Product2) + ', ';
if ($feature.Product2_Amount!=null) Var PA2 = Text($feature.Product2_Amount, '#.00');
if ($feature.Product2_Amount!=null) var PU2 = Text($feature.Product2_Unit) + ', ';
if ($feature.Product2_Concentration!=null) var PC2 = 'v/v: ' + Text($feature.Product2_Concentration, '##.00')+ '%, ';

if ($feature.Product3!=null) Var P3 = Text($feature.Product3) + ', ';
if ($feature.Product3_Amount!=null) Var PA3 = Text($feature.Product3_Amount, '#.00');
if ($feature.Product3_Amount!=null) var PU3 = Text($feature.Product3_Unit) + ', ';
if ($feature.Product3_Concentration!=null) var PC3 = 'v/v: ' + Text($feature.Product3_Concentration, '##.00')+ '%, ';
//Product info end

//Adjuvant info start
if ($feature.Adjuvant1!=null) Var A1 = Text($feature.Adjuvant1) + ', ';
if ($feature.Adjuvant1_Amount!=null) Var AA1 = Text($feature.Adjuvant1_Amount, '#.00');
if ($feature.Adjuvant1_Amount!=null) var AU1 = Text($feature.Adjuvant1_Unit) + ', ';
if ($feature.Adjuvant1_Concentration!=null) var AC1 = 'v/v: ' + Text($feature.Adjuvant1_Concentration, '##.00')+ '%, ';

if ($feature.Adjuvant2!=null) Var A2 = Text($feature.Adjuvant2) + ', ';
if ($feature.Adjuvant2_Amount!=null) Var AA2 = Text($feature.Adjuvant2_Amount, '#.00');
if ($feature.Adjuvant2_Amount!=null) var AU2 = Text($feature.Adjuvant2_Unit) + ', ';
if ($feature.Adjuvant2_Concentration!=null) var AC2 = 'v/v: ' + Text($feature.Adjuvant2_Concentration, '##.00')+ '%, ';

var TMI = "Tank Mix info: "+
TextFormatting.NewLine + C3 + CA3 + CU3 +
TextFormatting.NewLine + P1 + PA1 + PU1 + PC1 + ' '+
trim (TextFormatting.NewLine + P2 + PA2 + PU2 + PC2) + ' '+
trim (TextFormatting.NewLine + P3 + PA3 + PU3 + PC3 )+ ' '+
TextFormatting.NewLine + A1 + AA1 + AU1 + AC1 + ' ' +
trim (TextFormatting.NewLine + A2 + AA2 + AU2 + AC2);
//Adjuvant info end

//Start weather
if ($feature.Start_Temperature_F != null) var TempS = text('Weather:' + TextFormatting.NewLine + $feature.Start_Temperature_F);
if ($feature.End_Temperature_F != null) var TempE = text('-'+ $feature.end_Temperature_F);

if ($feature.Start_RH != null) var RHS = text(TextFormatting.NewLine + 'RH '+ $feature.Start_RH);
if ($feature.End_Temperature_F != null) var RHE = text('-'+ $feature.end_RH);

if ($feature.Start_Wind_mph != null) var WindS = text(TextFormatting.NewLine + 'Wind Spd ' + $feature.Start_Wind_mph);
if ($feature.End_Wind_mph != null) var WindE = text('-'+ $feature.End_Wind_mph);

if ($feature.Start_Wind_Dr != null) var WindDS = text(TextFormatting.NewLine + 'Wind Dr ' + $feature.Start_Wind_Dr);
if ($feature.End_Wind_Dr != null) var WindDE = text('-'+ $feature.End_Wind_Dr);

var weather =  tempS + TempE + 'F'
+ RHS + RHE +'%'
+ WindS +WindE  + ' mph'
+WindDS + WindDE
//End weather

Return TMI + TextFormatting.NewLine + weather + TextFormatting.NewLine + Applist
 
//end script
 
When I run the expression in the Arcade editor (hosted feature service visualization tab) I get this error message:
"Test execution error: Execution error - Identifier not recognized. Verify test data."
 
This error is occurring with a number of our Arcade expressions.  All of the expressions worked for multiple years without issue.  The hosted feature service and associated views have not been modified.  Any idea why these expressions are now causing errors in Field Maps? Any suggestions for a fix would be greatly appreciated.
Thanks,
0 Kudos
1 Reply
AndresEcheverri
Frequent Contributor

We are having a lot more issues with Field Maps with the latest update to the Mobile App. For example, when taking offline areas some configurations are not preserved in the offline area (for example transparencies), or some layers get an empty table. We are also experiencing more issues when taking offline areas. We are using ArcGIS Enterprise 11.2 and not sure if this might be related to incompatibility issues between the new mobile app and our ArcGIS Enterprise version as all the new functionalities the new app has are not present in ArcGIS Enterprise 11.2.

0 Kudos