0

I have a layer and I am configuring pop-ups, but in one specific field - Name, I have blank records which I don't want to include them in the pop -ups. Does anyone knows how to create the expression, when the field is blank to hide the entire field? Otherwise to show the information about the name.

2
0

The article Russ mentioned above is a nice way to go if you are want to configure a nice look to the Popup. If you're looking for a quick way without much configuration you can go with something like this:

var skipFields = ['Creator', 'CreationDate', 'Editor', 'EditDate', 'OBJECTID', 'GlobalID'];
var allFields = '';
for(var i in $feature){
    var skip = False;
    for(var j in skipFields){
        if(Text(i) == Text(skipFields[j])){
            skip = True;
        }
    }

    if(isEmpty($feature[i])){
        Console(Concatenate('Null Field: ', i));
    } else if (skip){
        Console(Concatenate('Skipping Field: ', i));
    } else {
        Console(Concatenate('Including Field: ', i));
        allFields = Concatenate([allFields, Upper(i), TextFormatting.NewLine, Text($feature[i]), TextFormatting.NewLine, TextFormatting.NewLine]);
    }
}

Console(allFields);
return allFields;

It returns a basic output as below:

Image of popup after configuring Arcade expression

Quick but a little raw!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.