I used an Arcade expression that was connected to some layers in a Text widget in an Experience Builder app last week. The widget worked as expected. When I checked the app today, the Arcade expression wasn't returning anything. When I checked the widget's Arcade expression it was throwing an error on the $dataSources profile variable saying that it "is not defined".
Also the Arcade editor now shows that this profile no longer has any Profile variables:
Now, if I try to add another Arcade expression into this same Text widget, it just shows an empty script (before it had a built-in function and commented-out variables that linked to all of the layers I had defined in the "connect to data" in the Text widget configuration). If I try to add dynamic content, that works. If I create a new Text widget that is connected to just single layer, an Arcade expression works. But if I try to make an Arcade expression connected to more than one layer in the map, it again doesn't even recognize the $dataSources profile variable. The weird thing is that it was working fine a few days ago.
Solved! Go to Solution.
Thanks @EdwardMcFarlin , this bug should be fixed by today's update.
Thanks @EdwardMcFarlin , this bug should be fixed by today's update.
I'm still experiencing this bug in the Developer Edition. Will this be fixed any time soon?
Latest version downloaded from here: https://developers.arcgis.com/experience-builder/guide/downloads/
Hi @DavidHanimann , I tested this on the latest version of Developer Edition but couldn’t reproduce the bug. Could you try reproducing it on ArcGIS Online? Even if it looks similar, the issue might be caused by something else.
Shengdi
I have checked the behaviour again. When I use the Text Widget stand-alone, it works as expected:
However, when I use the widget inside a list widget with the exact same data sources, the described behaviour occurs with $datasources not showing up:
MIght this be the issue?
Hi @DavidHanimann , This is a known bug and will be fixed in the next AGOL release. However, even after the bug is resolved, using $dataSources (instead of $feature) in a text widget inside a list widget will still not be supported, as it can cause significant performance issues.
Oh great! It is working again! Thank you, @ShengdiZhang!