I'm not sure if anyone has written about this before, so here's a nice little writeup of a solution to a common problem:
A frequent issue with popups is only showing the fields that aren't empty. This comes up on Esri Community all the time, and they've written a few support articles about it over the years.
However, the common solutions always involve listing out each field to check whether or not it's empty, something like
IIF($feature["Meter_Meter_Flow"] == -999, "None", "inline")
Having finally gotten in a position today where I needed to filter 50-odd fields down to something usable, here's a rough snippet that will get all of those empty fields out of the way and return an