Hey Garrett,
Here is some arcade you can use. It will remove any fields that are null/empty. Additionally, the order in which you declare the fields in the script will be how they show up in the popup.
var fields = Dictionary('Field Name 1',$feature.Fieldname1,
'Field Name 2',$feature.Fieldname2,
'Field Name 3',$feature.Fieldname3);
var fields = [Dictionary('fieldName', 'Field Name 1', 'fieldValue', $feature.Fieldname1), Dictionary('fieldName', 'FieldName2', 'fieldValue', $feature.Fieldname2), Dictionary('fieldName', 'Field Name 3', 'fieldValue', $feature.Fieldname3)];
var popup = '';
for(var f in fields){
if (IsNan(fields[f]['fieldValue'])== false && IsEmpty(fields[f]['fieldValue']) == false){
popup += Concatenate([fields[f]['fieldName'], ':', ' ', fields[f]['fieldValue'], '\n'], '');
}
}
return popup;
Just insert the expression into your popup as a custom popup. If there are a ton of fields, it can be tedious but it works!
If its being entered into a Details Element within a dashboard you can also add html tags to line 15 to make text bold or add color.
Just a note: This does not change the actual data itself in any way. It's just forming the popup in memory and displaying the data in a different way visually.