Arcade - Table Search

379
3
04-28-2020 09:00 AM
DeenaBowman
Occasional Contributor

Hello Xander Bakker and other Arcade gurus,

I have had a lot of success with Arcade returning lists from tables where a relationship class exists -- thank you Xander for your excellent documentation!  I now have a stand-alone table that I would like to search using a drawing number retrieved from a feature layer.  If the drawing number exists in the table of restricted records, the feature layer popup (e.g. pump station, water main, etc.) will have a expression returning Yes (for restricted record).  If the drawing number is not found the expression will return No.

I've have tried changing the name of the table and using $datasource and $map.  The original table was published from an XLSX to ArcGIS Online using ArcGIS Pro 2.5.  I subsequently created a view using the Create View Layer option.  I have tried changing the name as well as using double quotes and single quotes.  I always get an execution error where the identifier cannot be found with the expression associated with the feature layer.  There is no problem when I apply this variable to an expression for the actual table.

The feature layers are in a hosted service on our Portal Instance.  At the moment it is not feasible to recreate the REST services to include an attribute for restricted record for every endpoint.

Tags (2)
0 Kudos
3 Replies
XanderBakker
Esri Esteemed Contributor

Hi dmbjamieson ,

Can you try $datastore? $datasource does not exist in Arcade as far as I know.

0 Kudos
DeenaBowman
Occasional Contributor

Hi Xander Bakker‌, that was a dumb mistake!  That said, I'm still seeing an error message even with $datastore.  The same is true from $map.  I tried republishing the table to AGOL, but no luck.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Deena Bowman ,

Just te be clear about something, the FeatureSetByName function you are using is generated by using the options in the interface (selecting them from the Globals tap) and not specifying the parameters manually? 

0 Kudos