Custom popups - removing extra space

660
6
11-11-2021 01:48 PM
Ken-Middleton
New Contributor II

I have a project that includes links to outside sources (photos, docs, etc.) in customized popups. For some properties there are several of these links whereas others may only have one. The attachments show 1) how I've set up the popups, 2) one popup with several links and no extra white space, and 3) another popup with extra space because of there is only one link under each heading.  Is there a way to remove the empty space if a field has no value? Or are there other ways of handling this problem.

I've found that just using the list of field attributes in Map Classic Viewer pretty clunky because two fields have to display for a linked source (the name and the url), among other issues.

0 Kudos
6 Replies
PSGeo1
by
New Contributor III

Hi,

I found this Contribution very useful. Moreover, I found some of the comments also useful.
Myself I found that creating a table in html was the best solution to eliminate the empty fields.
I have attachments and eventually I will struggle when I get to update that part in the popup.

cheers

P

PSGeo1
by
New Contributor III

lol... I forgot to add the links to the discussion. 

But KenBuja already provided those.

0 Kudos
KenBuja
MVP Esteemed Contributor

You can use the table method to remove empty lines that is outlined here: https://community.esri.com/t5/arcgis-online-blog/conditional-field-display-with-arcade-in-pop-ups/ba...

There is also a subsequent discussion on that methodology here: https://community.esri.com/t5/arcgis-online-documents/conditional-field-display-with-arcade-in-pop-u...

Ken-Middleton
New Contributor II

Many thanks!. This looks like just what I need. I'll give it a try.

0 Kudos
VMitch
by
New Contributor III

 I also create tables in html to get past this problem. Hope you are able to get it sorted. Good luck

0 Kudos
Ken-Middleton
New Contributor II

I've not solved it yet. Although I understand the examples given, I don't see how it works when the you have two fields combined (the Source and the link to the source combined so the user can click on the Source name to go to the relevant url). How would that look in an Arcade expression? I'm not explaing this well, but I would love to see any examples you have whether or not they apply to my specific question.

0 Kudos