Portal 10.8.1 Popup expressions that are pulling from related tables work fine and are formatted correctly in map viewer classic popups. But when I view the popups in WebAppBuilder the popups are all bunched together.Any ideas?
I ended up having to upgrade my Portal setup to 10.9.1 to resolve the issue.
@JohannesLindner Thanks for looking.Im thinking the issue is deeper than Arcade for the following reasons:1. This happens on Chrome, Edge, and IE11(Still have a machine with IE). 2 . When I highlight the popup info in Map Viewer Classic and inspect it under Chrome the <span> tags have class="newcharline" in the code
When I highlight the popup info in WebAppBuilder and inspect it under Chrome the <span> tags are missing the class="newcharline" code. I have a ticket with tech support open on this as of this morning.
Hmmm... I can't reproduce this, they look the same to me:
Map Viewer Classic:
Web App Builder:
But, notice that the first "linebreak" line in my popups is only half length (the last one, too)? If you look at your code, that makes sense: At the end of each iteration, you add a new line and linebreak, at the start you add linebreak. So for each iteration except the first, the dashed line on top will be 2 * linebreak.
Looking at your popups, I don't see that behavior, so unless I'm missing something, this doesn't seem to be the code your popups use.
Anyway, try a slightly different approach:
var linebreak = "-------------------------" var popupLines = [linebreak] // we're using an array to store the lines of the popup for (var f in relatedrecords) { // If SITEADDID is not empty, push it into the array if (!IsEmpty(f.SITEADDID)){ Push(popupLines, "APN: " + f.SITEADDID) } // If FULLADDR is not empty, push it into the array if (!IsEmpty(f.FULLADDR)){ Push(popupLines, f.FULLADDR) } // get the dashed line in Push(popupLines, linebreak) } // Concatenate the array with NewLine and return return Concatenate(popupLines, TextFormatting.NewLine)
@jcarlson @JohannesLindner
The Arcade code I'm using is below. Thank you for taking a look.
/* Access 'Parcels has SiteAddressPoints' relationship using the function FeatureSetByRelationshipName. This will pull all Base addresses on the parcel from Site Address Points feature */ // These are the fields that need to be accessed from the related table var assrFields = ['SITEADDID', 'FULLADDR'] // This is the variable to pull the related table records var relatedrecords = (FeatureSetByRelationshipName($feature, 'SiteAddressPoint', assrFields, false)) // Declare variables var popupString = '' var linebreak = "-------------------------" /* the popup expression is constructed by using a For Loop to iterate through all related features */ for (var f in relatedrecords) { popupString += linebreak // If SITEADDID is not empty then add declared variable "a" to the popupString if (!IsEmpty(f.SITEADDID)){ var a = (TextFormatting.NewLine + "APN: " + f.SITEADDID) popupString += a } // If FULLADDR is not empty then add declared variable "a" to the popupString if (!IsEmpty(f.FULLADDR)){ var a = (TextFormatting.NewLine + f.FULLADDR) popupString += a } popupString += TextFormatting.NewLine + linebreak } return popupString
How are you handling line breaks in your popup expression? It looks like that's probably the cause, somehow WAB is ignoring your line breaks.
Can you post the code please?
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.