AnsweredAssumed Answered

Arcade Feature-Set Works but Does Not Display in Popup

Question asked by Amanda.Huber@threeriversparks.org_trpd on Mar 11, 2019
Latest reply on Mar 18, 2019 by Amanda.Huber@threeriversparks.org_trpd

Hi All, 

We recently constructed an Arcade expression using Feature-Sets. The arcade expression validates but does not display in the popup. It's a simple text string that should display. Even if we change the return to an arbitrary word like "test" it still does not display in the popup. Please see images below. Expression is in text form at the bottom of the post. 


Any other arcade expressions work fine in this web map and popup. 


Explanation of the expression: 

We're displaying a string of text that falls under three parameters NotesOrObservation is Observation, SpeciesType is House Wren, and DateofObservation is Current Year. Since "AND" statements don't seem to be a supported Arcade function we used the below. 

-  Feature-Set is looking at the related table in the map

-  Sorting by "DateOfObservation" date descending

-  If parameter is met "Yes" is returned

- Return is a concatenation of three parameters

      example) If all three parameters are Yes then "yesyesyes" is returned 


Arcade Expression and Result: 

Expression in popup configuration: 



Popup Blank Return: 




var Related= FeatureSetByName($datastore,"BlueBird_Boxes_Records")
var sort = OrderBy(Related, "DateOfObservation Desc")
var top1= Top(sort, 1)
for (var x in top1){var species = x.SpeciesType; var NoteOB = x.NotesorObservation;var DateOB = x.DateOfObservation}
var yesno = ''
iif (species == 'House Wren', yesno += 'yes', yesno +='no')
iif (NoteOB == 'Observation', yesno += 'yes', yesno +='no')
iif (Year(DateOB) == Year(Now()), yesno += 'yes', yesno +='no')

return yesno