Select to view content in your preferred language

Table won't load in Field Maps Arcade -- error Code = 3072

855
4
Jump to solution
04-16-2024 04:51 PM
nate0102
Occasional Contributor
 
 
Cannot load table according to Field Maps app log, I'm pretty sure my code is fine.. what am I missing?
 
I can see the table in the Arcade editor in FM Designer.
 
"Can only call this method on a loaded table...............Table () failed to load with error: Error Domain=NSCocoaErrorDomain Code=3072 "User canceled error"
 

 

 

if (!IsEmpty($feature.scientificname) && !IsEmpty($feature.survey_area)) {

  var sciName = $feature.scientificname
  var surveyArea = $feature.survey_area

  var priorityTable = FeatureSetById($map, "my_table_ID_#");
  var filtered = Filter(priorityTable, "botanical_name = @sciName AND zone = @surveyArea");
  if (!IsEmpty(filtered)) {
    return First(filtered).apa_priority
  } else {
    return "no cat found"
  }

} else {
  return "uncat"
}

 

 

0 Kudos
2 Solutions

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

My only guess then is the AND in the filter as I can find no examples of this.  Do a test without the and just to see.

View solution in original post

0 Kudos
nate0102
Occasional Contributor

Hi @DougBrowning ,

Thanks for your suggestions!

ESRI support figured out a work around:

Move the First() to line 7 instead of 9 like so:

var filtered = First(Filter(priorityTable, "botanical_name = @sciName AND zone = @surveyArea"));

They unfortunately couldn't figure out why this code worked as opposed to the other code.

Hope this helps someone in the future...

View solution in original post

4 Replies
DougBrowning
MVP Esteemed Contributor

Have you tried FeatureSetByName instead?  It can get picky.  Also the table is in the map right?

nate0102
Occasional Contributor

Hi @DougBrowning thanks for your reply.

Yes, I have tried FeatureSetByName, and it definitely is in the Web Map, I can see it in the arcade profile variables, as well as in the layers/tables list in Field Maps Designer. I've also been able to replicate the code in the Arcade Playground by making the table shared public. Still no luck.

The table is not part of the Feature Layer (hosted), but is part of the Web Map, that's the only other thing I can think of now.

0 Kudos
DougBrowning
MVP Esteemed Contributor

My only guess then is the AND in the filter as I can find no examples of this.  Do a test without the and just to see.

0 Kudos
nate0102
Occasional Contributor

Hi @DougBrowning ,

Thanks for your suggestions!

ESRI support figured out a work around:

Move the First() to line 7 instead of 9 like so:

var filtered = First(Filter(priorityTable, "botanical_name = @sciName AND zone = @surveyArea"));

They unfortunately couldn't figure out why this code worked as opposed to the other code.

Hope this helps someone in the future...