Domain names in Arcade for Pop-up (New Map Viewer/Experience Builder)

95
3
Wednesday
Labels (1)
Ramon_de_Leon
New Contributor III

Is there a glitch in displaying domain names in the "New Map Viewer" and "Experience Builder"?

I have the script below for my pop-up, it displays correctly when the map is viewed in the "Classic Map Viewer" and WebAppBuilder, but when viewed in the "New Map Viewer" and "Experience Builder" the domain name becomes blank (see screenshot of popup comparison at the end of the post)? The pop-up is also previewed correctly when tested on the custom pop-up expression window.

Was hoping to be able to use the "New Map Viewer" and "Experience Builder", but the popup is an essential thing that I need in my design.

Will appreciate any solution or workaround.

 

var project_1 = 'Project: ' + DomainName($feature,"WORK_TYPE_1") + TextFormatting.NewLine + 'Description: ' + $feature["PROJ_DESC_1"] + TextFormatting.NewLine + 'Start Date: ' + Text ($feature["PROJ_START_1"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Target Completion Date: ' + Text ($feature["PROJ_END_1"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Project Status: ' + DomainName($feature,"WORK_STATUS_1") + TextFormatting.NewLine + '<br /><a href="' + $feature["HYPERLINK_1"] + '" target="_blank">Click link for more info</a>'

var project_2 = TextFormatting.NewLine + TextFormatting.NewLine + TextFormatting.NewLine + '------------------------------------------'+ TextFormatting.NewLine + 'Project: ' + DomainName($feature,"WORK_TYPE_2") + TextFormatting.NewLine + 'Description: ' + $feature["PROJ_DESC_2"] + TextFormatting.NewLine + 'Start Date: ' + Text ($feature["PROJ_START_2"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Target Completion Date: ' + Text ($feature["PROJ_END_2"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Project Status: ' + DomainName($feature,"WORK_STATUS_2") + TextFormatting.NewLine + '<br /><a href="' + $feature["HYPERLINK_2"] + '" target="_blank">Click link for more info</a>'

var project_3 = TextFormatting.NewLine + TextFormatting.NewLine + TextFormatting.NewLine + '------------------------------------------' + TextFormatting.NewLine + 'Project: ' + DomainName($feature,"WORK_TYPE_3") + TextFormatting.NewLine + 'Description: ' + $feature["PROJ_DESC_3"] + TextFormatting.NewLine + 'Start Date: ' + Text ($feature["PROJ_START_3"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Target Completion Date: ' + Text ($feature["PROJ_END_3"], 'MMMM DD, YYYY') + TextFormatting.NewLine + 'Project Status: ' + DomainName($feature,"WORK_STATUS_3") + TextFormatting.NewLine + '<br /><a href="' + $feature["HYPERLINK_3"] + '" target="_blank">Click link for more info</a>'

var project_2_extra = IIf(($feature["WORK_STATUS_2"] == 'planned' || $feature["WORK_STATUS_2"] == 'ongoing'), project_2, '')

var project_3_extra = IIf(($feature["WORK_STATUS_3"] == 'planned' || $feature["WORK_STATUS_3"] == 'ongoing'), project_3, '')

var popup_info = project_1 + project_2_extra + project_3_extra

Return popup_info

 

 

Ramon_de_Leon_0-1623269768552.png

 

 

 

0 Kudos
3 Replies
KenBuja
MVP Honored Contributor

There does seem to be a glitch.

Nothing is returned using the domain

return "Domain: " + DomainName($feature,"FishStatus") + TextFormatting.NewLine
       //+ "Value: " + $feature.FishStatus;

domain.png

 If I add in the actual value, then the Domain value shows up:

return "Domain: " + DomainName($feature,"FishStatus") + TextFormatting.NewLine
       + "Value: " + $feature.FishStatus;

 

domain1.png

Ramon_de_Leon
New Contributor III

Thanks for testing.

It's weird that when you added the both domain value and name on the the arcade script it displayed correctly. 

Hope Esri gets a fix soon.

0 Kudos
KenBuja
MVP Honored Contributor

Don't rely on them reading this thread to fix it. If you can, open a support case to bring it to their attention.

0 Kudos