Public Notification solution and Arcade expressions in the popup

148
4
09-25-2019 02:38 PM
Highlighted
Regular Contributor II

I am implementing the Public Notification application in our county. I have deployed it using the solutions deployment tool, I have added fields required by our situation (ADDRESS2, INCAREOF, COUNTRY) and I have configured the popup to show that information. I used an arcade expression that uses some conditional statements based on the contents of ADDRESS2 and INCAREOF - I skip those lines if those fields are blank. But when I create labels based off of the popup, it returns all of the text on a single line. I am assuming the application is looking for a newline character that the custom popup dialog spits out instead of the Arcade "TextFormatting.NewLine". Does anyone know what I could put in my Arcade expression to mimic that newline character?

Thanks,

Jeff Ward
Summit County, Utah
4 Replies
Highlighted
Esri Regular Contributor

Jeff,

Can you post  the expression you are using?

I think it should work, if your expression returns a 'string' + textformating.newline + 'string'

Mark

Reply
0 Kudos
Highlighted
Regular Contributor II

Mark,

Here is my expression. It works fine when I click on a property, but the output doesn't work in the application.

If(IsEmpty($feature.ADDRESS2) && IsEmpty($feature.INCAREOF)) {
    return $feature.OWNERNME1 + TextFormatting.NewLine + $feature.PSTLADDRESS + TextFormatting.NewLine + $feature.PSTLCITY + " " + $feature.PSTLSTATE + " " + $feature.ZIP
}

If(IsEmpty($feature.ADDRESS2) && !IsEmpty($feature.INCAREOF)) {
    return $feature.OWNERNME1 + TextFormatting.NewLine + $feature.INCAREOF + TextFormatting.NewLine + $feature.PSTLADDRESS + TextFormatting.NewLine + $feature.PSTLCITY + " " + $feature.PSTLSTATE + " " + $feature.ZIP
}

If(!IsEmpty($feature.ADDRESS2) && IsEmpty($feature.INCAREOF)) {
    return $feature.OWNERNME1 + TextFormatting.NewLine + $feature.PSTLADDRESS + TextFormatting.NewLine + $feature.ADDRESS2 + TextFormatting.NewLine + $feature.PSTLCITY + " " + $feature.PSTLSTATE + " " + $feature.ZIP
}

If(!IsEmpty($feature.ADDRESS2) && !IsEmpty($feature.INCAREOF)) {
    return $feature.OWNERNME1 + TextFormatting.NewLine + $feature.INCAREOF + TextFormatting.NewLine + $feature.PSTLADDRESS + TextFormatting.NewLine + $feature.ADDRESS2 + TextFormatting.NewLine + $feature.PSTLCITY + " " + $feature.PSTLSTATE + " " + $feature.ZIP
}

Jeff Ward
Summit County, Utah
Reply
0 Kudos
Highlighted
Esri Regular Contributor

Jeff,

Found out the Textformatting.newline is not supported in a web-browser.  This article explains - FAQ: Is it possible to create multiline labels in ArcGIS Online? 

sorry about that, I have been working with desktop and Esri runtime apps, and it will format in an app like Explorer for ArcGIS.

Mark

Reply
0 Kudos
Highlighted
Regular Contributor II

Mark,

The public notification app grabs the information from the popup, which  does allow newline formatting. I'm thinking the process between popup to pdf doesn't handle the newline formatting. I think I'm going to download the source code and see if I can't see where it is falling apart.

Jeff

Jeff Ward
Summit County, Utah
Reply
0 Kudos