Is it possible to remove the attachment name from pop up in new map viewer?

1794
10
Jump to solution
02-28-2022 10:24 AM
VictoriaTousaw
New Contributor III

When I add an image attachment to a hosted feature layer and configure the pop up to display the attachment, it automatically puts the file name below the image. Is there a way to remove this file name from the pop up? 

VictoriaTousaw_1-1646072598200.png

In this example is there a way to remove the text "559 - CL 9.JPG" below the picture from the pop up? 

1 Solution

Accepted Solutions
MappyIan
Occasional Contributor II

This seems to have been resolved.

I've just discovered completely by accident that the filename no longer appears if you add the Attachment content type to your popup in ArcGIS Online (in 'gallery' mode). There's no mention of it in the latest What's New... blog post/documentation (https://www.esri.com/arcgis-blog/products/arcgis-online/announcements/whats-new-arcgis-online-novemb...) so maybe this wasn't deliberate on ESRIs part and might be undone in a future release - who knows!

For now, it seems to be working as desired and the filename is no longer displayed when using the 'gallery' mode (although there is no option to display the filename if you were using that before).

View solution in original post

0 Kudos
10 Replies
ABishop
MVP Regular Contributor

Hello Victoria,

Have you tried modifying the name of the attachment in the attachment table?  Or checking to see if there are customizable settings for your pop-up?

Amanda Bishop, GISP
0 Kudos
VictoriaTousaw
New Contributor III

Hi Amanda, 

I am unable to change the name of the attachment in the table. When I try to edit, I only have the option to change the photo, no options to change the name of the file. 

VictoriaTousaw_0-1646079177566.png

These are the customizable settings I have for the pop up. Changing the Title or Description fields for the table adds additional text above the image, but does not affect the file name below. 

0 Kudos
ABishop
MVP Regular Contributor

Just an idea, but have you tried arcade expressions? 

I found this thread: https://community.esri.com/t5/arcgis-online-blog/show-attachments-in-pop-ups-with-arcade/ba-p/890588 

Amanda Bishop, GISP
0 Kudos
MappyIan
Occasional Contributor II

I hit the same problem (wanting to get rid of the filename from the Map Viewer popup), and the solution posted by @ABishop worked for me.  It's a bit fiddly but I got it to work.  Rather than add fields and calculate the number of attachments which is done in the above linked blog post I just added a check in the AttributeExpression instead.  Code below:

// script to return the URL of the image/logo attachment
// assumes one image/logo attachment per feature
// will only return the first attachment, which is assumed to be an image/logo
// from: https://community.esri.com/t5/arcgis-online-blog/show-attachments-in-pop-ups-with-arcade/ba-p/890588

var imageURL = "";

// test to catch any features that do not have an attachment
if (count(Attachments($feature)) > 0) {
// uses a View that is publicly accessible:
var Part1 = "https://services-eu1.arcgis.com/xxxxxxxx/arcgis/rest/services/survey123_xxxxxxxxx_fieldworker/FeatureServer/0/"
var ObjectID = $feature.OBJECTID
var Part2 = "/attachments/"
// assumes image/logo is the first attachment
var AttachID = First(Attachments($feature)).ID
imageURL = Part1 + ObjectID + Part2 + AttachID;
}
return imageURL;

Whilst this works, it would be so much nicer if there was an option on the Attachment content item to suppress filenames.

MappyIan
Occasional Contributor II

I've submitted this as an idea (feel free to add any comments to the idea): https://community.esri.com/t5/arcgis-online-ideas/add-option-to-remove-attachment-filename-from/idi-...

0 Kudos
JanetSilb_Spike
New Contributor III

Hi, has this been solved?  The arcade expression mentioned does something different. I am running into this same challenge - I would like to remove the file name from showing in the pop ups. 

RandyMcGregor3
Occasional Contributor III

The ability to remove the file name from an attachment that has been clicked on - or change it (like a field alias) would be wonderful. Having the file name, complete with extension, appear below the image is awkward. 

MappyIan
Occasional Contributor II

This seems to have been resolved.

I've just discovered completely by accident that the filename no longer appears if you add the Attachment content type to your popup in ArcGIS Online (in 'gallery' mode). There's no mention of it in the latest What's New... blog post/documentation (https://www.esri.com/arcgis-blog/products/arcgis-online/announcements/whats-new-arcgis-online-novemb...) so maybe this wasn't deliberate on ESRIs part and might be undone in a future release - who knows!

For now, it seems to be working as desired and the filename is no longer displayed when using the 'gallery' mode (although there is no option to display the filename if you were using that before).

0 Kudos
VictoriaTousaw
New Contributor III

I noticed this as well recently. Hopefully the change is here to stay!