Prevent fields with NULL values from showing up in pop-up window

316
4
03-27-2020 10:44 AM
Highlighted
New Contributor III

Hello,

I have a layer in a web map that has about 30 fields in it, and I'd like to show only those fields that do not show NULL values.  As shown in the screenshot below, the ideal outcome is to show only the field names and values that have a value, so there aren't a bunch of blank records.  Full disclosure...programming is not my strong suite!  I've been poking around with google searches on how to use Arcade to filter out empty values from an array of fields, and using 'IIF' statements, but haven't quite found exactly what I'm looking for.  If any of you have a custom-configured Arcade script from a web map where you filtered out the NULL values you'd be willing to share it would be greatly appreciated!

Reply
0 Kudos
4 Replies
Highlighted
MVP Regular Contributor

You mentioned you've searched some sites for a solution....did you look at this blog post, by chance?

https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-disp... 

It would be a bit tedious to set up, but it seems like it would do exactly what you're looking for. 

Reply
0 Kudos
Highlighted
New Contributor III

Thanks Katherine.  I did see that post, but I'm kind of a lazybones and didn't want to set up an expression for each field, so I was hoping for something easier.  This seems like it could work though if nothing else comes up.  Thanks!

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Take a look at this thread from 2019; you might find what you are looking for:

https://community.esri.com/thread/233503-can-i-eliminate-empty-values-using-arcade-in-my-pop-up 

Reply
0 Kudos
Highlighted
New Contributor III

This looks promising.  I will give this a try later today, thank you!

Reply
0 Kudos