Arcade Expression in Webmap Popups (Enterprise Portal)

666
3
06-13-2022 02:32 PM
survey123_solutions
New Contributor III

Hi- I'm using enterprise portal 10.8.1.  I am trying to display fields from related tables in the web map popups. 

Been working on the Arcade expression in Web Map (Configure Popup).   For some reason, in enterprise portal, the new Web Map is not available (unless my team needs to upgrade?) -- I've noticed after watching a ton of Esri videos that are all demos on AGOL, that when using Portal, not all of the right fields are plugged when using the tool as would be the case if I was using the new MapViewer on AGOL.    I read a bunch of articles (many good ones!) and just about every piece of documentation on this topic, I think I've also watched every Esri video on the topic too! - 😞 but to no avail. 

Right now, I have this expression below that is working, but it is displaying the name, but not the label - of the fields.  In other words, it shows worker1, worker10, worker45, worker123 instead of John Doe, Mary Sue, etc.

My expression is below:

FeatureSetByRelationshipName($feature, "WA1_0v3_repeat_assignedworkers", ['assignedworkers'], false)

If anyone can help, would greatly appreciate it!
Thanks!

0 Kudos
3 Replies
DougBrowning
MVP Esteemed Contributor

Common issue posted is that FeatureSetByRelationshipName almost never works.  One issue is if there is a . in the name and another I think was Enterprise.  Use FeatureSetByName (or one of the others if not using a map) and give it your own Key query.

Like 
var sql = "PlotID = '" + $feature.PlotID + "'";
var tbl = Filter(FeatureSetByName($map,"Plots", ['SpeciesState'], false), sql);

Hope that helps

0 Kudos
survey123_solutions
New Contributor III

Hi Doug,
Thank you SO much for your insight.  I gave it a shot and still getting execution error.  Something in my code is off.   If you would take a quick look.  Below is a glimpse of the schema - thanks so much.

var sql = "WA1_0v3 = '" + $feature.WA1_0v3 + "'";
var tbl = Filter(FeatureSetByName($map,"WA1_0v3_repeat_assignedworkers", ['assignedeworkers'], false), sql);

 

 

schema.JPGarcade-expression.JPG

0 Kudos
DougBrowning
MVP Esteemed Contributor

Looks like a typo on the field name  'assignedeworkers'  you have a e in the middle here. 

Oh and you will prob need the field you are going to filter on.  Looks like WA1_0v3?

0 Kudos