AnsweredAssumed Answered

Arcade Expression in Image Popup

Question asked by ldmitruk@edmonton.ab.ca on Dec 5, 2018
Latest reply on Dec 5, 2018 by ldmitruk@edmonton.ab.ca

Hi,

 

I'm trying to a simple expression in Arcade to populate the image portion of a popup. I have two fields in my data containing the google drive location of the image and its thumbnail. I use the following to test if an image exists for record:

 

 return IIF(isEmpty($feature.Picture), "", $feature.Picture)

 

and the popup is configure as follows:

 

 Popup Media Configuration

 

This works as expected when there is no image available.

 

No image for feature

 

However when there is an image the following happens: 

 

Popup with image

When I checked the response it turns out Arcade is trashing the URL from the field. So instead of sending 

 

https://drive.google.com/foo/b.ar/uc?export=view&id=1qLYMclQ5nDGYaM895ziF-5EzD4Am385-

 

The following is sent:

 

https://drive.google.com/foo/b.ar/uc?export=view&id=1qLYMclQ5nDGYaM895ziF-5EzD4Am385-

 

Notice how & got changed to &. This ends up causing the GET request for the image to fail/

 

Accessing the images by just passing the field into the popup works fine, but I'd rather test for the existence and only provide the link and thumbnail if there is one. Any thoughts on why this is happening and how to prevent it?

 

Cheers

Outcomes