So, I'm sure many folks who've fiddle around with arcade expressions in webmaps have noticed that, when an arcade expression (added as a text element, not an arcade element) returns null in a popup, it still takes up a blank line as a sort of placeholder.
My question is if there's a way to hide this line. So, say my expression is this:
if($feature.status == "Demolished") {
return "This Feature Has Been Demolished"
}
When $feature.status != demolished a line is still created in the place of where the text should be, resulting in an empty line in between popup elements, despite the lack of an else return statement such as "else return ""."
I've seen similar posts about this in the community but haven't found a working answer. If anybody could tell me whether this is fixable or destined to be I would greatly appreciate it.
Thanks!
Solved! Go to Solution.
It doesn't look like there's a way to do that within the text element. Is there way to replicate what you have in the text element in an Arcade element instead?
you could try the following at the end of a sentence in the popup rather than on a new line
if($feature.status == "PLN") {
return (TextFormatting.NewLine + "This Feature Has Been Demolished")
}
else {
return ""
}
Does this meet your needs?
It doesn't look like there's a way to do that within the text element. Is there way to replicate what you have in the text element in an Arcade element instead?
Yes there is, whoops, I just had to return a dictionary in the element itself rather than a string. Still getting the hang of arcade. Thanks for the suggestion!