I am attempting to use Arcade to configure pop-ups for a web map and web app.
I want the popup to display certain fields if they are not empty, but not display anything for the fields when they are empty. Using Text elements in the popup has the drawback of including whitespace for fields that are blank - so if several fields displayed in order are all empty, a large block of the popup is white space.
I have an Arcade expression to check whether fields are empty before appending them to the "return" text, but when I use this expression any carriage returns within the text body of an individual field are removed - so if a field has two or three paragraphs, it is all displayed as a single lump of text.
I have tried replacing any hidden newline characters in the text field with the Arcade TextFormatting.NewLine, but this did not help.
Any suggestions would be much appreciated!