Arcade expression fails in Popup in VertiGIS Studio Web when second feature clicked
Hi Community,
I have a weird issue in VertiGIS Studio Web, but I am sure you will be able to help. So, many thanks in advance!
In ArcGIS Pro I have configured a popup for a feature layer, using a mixture of Arcade an HTML. In Pro this popup works fine, as expected.
The feature layer is published as a map image layer and in a web map in ArcGIS Portal in the Map Viewer the popup works also fine, also as expected.
When I add the map to a map component in VertiGIS Studio Web, however, the popup works only a single time…
When I launch the VertiGIS app and I click a feature the content of the popup is shown correctly in the Result Details. So, the Arcade expression is executed correctly and the HTML (styling) applied as expected. Looks great!
However, however, however… when I click a second feature the Result Details remain empty…?!
The error message in the console says:
[PopupExpression]: Failed to execute Arcade script for ExpressionContent in PopupTemplate. Source: Vigerende peilgebieden, Feature: 1352
How come? The first time the Arcade script is executed correctly, the second (and third and fourth) time not…?!
What am I doing wrong? Please help.
A workaround is to refresh the app and click a feature to see the details. But we would like to avoid – if possible - to have to instruct the users to refresh the app all the time…
TIA,
Egge-Jan
-
Hi Egge-Jan,
Unfortunately, we ran into similar issues. It seems to be a long-standing bug. We haven't found a real solution, but we did find a ‘work-around’ (albeit an ugly one): adding the fields with the Arcade expressions in a fieldlist within the pop-up.
Your error message is a bit different, so not sure if this applies, but you can take a look at this previous issue: Is any on having problems with popup Arcade expression in the Web viewer? – VertiGIS Support
0 -
Hi Yannick Mijnheer,
Thanks for your reply. When googling on my issue I have found the post you are referring to. But hey, that was an issue 4 years ago…
We are using the latest and the greatest, so there was some hope that support for Arcade in the Result Details had been implemented properly by now…
You are right in stating that our error message is slightly different from yours. So I did not yet manage to implement the (ugly) workaround you have found. But I'll try again.
Cheers,
Egge-Jan
[viewer]: Application version: 5.33.045839.286a1be6.js:2 [viewer]: VertiGIS ArcGIS-Extensions version: 48.0.245839.286a1be6.js:2 [viewer]: VertiGIS Viewer-Spec version: 58.9.045839.286a1be6.js:2 [viewer]: VertiGIS Studio Workflow version: 5.42.0+4945839.286a1be6.js:2 [viewer]: VertiGIS Studio Search version: 1.9.045839.286a1be6.js:2 [viewer]: Esri ArcGIS API version: 4.31.20 -
Hi Yannick Mijnheer and - of course - the rest of the VertiGIS community,
I have found a workaround slightly different from the solution from the band-aid provided in this post:
In ArcGIS Pro I have extended the popup - underneath the Arcade expression - with an html table with all the relvant columns for the Arcade expression and I have set the style of this table to
display:none, so it is there for VertiGIS to find all the information needed for it to execute the Arcade expression, but it remains invisible for the end user.Not a very convenient solution, but hey, it works… it does the job:
<table style='display:none;'> <tbody> <tr> <td>Code</td><td>{GPGIDENT}</td> </tr> <tr> <td>Beheer</td><td>{IWS_GPGBEHER}</td> </tr> <tr> <td>Zomerpeil (m NAP)</td><td>{GPGZMRPL}</td> </tr> [ ... etcetera ...] </tbody> </table>HTH,
Egge-Jan
4 -
Egge-Jan Pollé ohhh, that's really clever! Thanks for sharing :)
1
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires