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

2031
6
Jump to solution
06-09-2021 01:15 PM
Ramon_de_Leon
Occasional Contributor

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

 

 

 

1 Solution

Accepted Solutions
Ramon_de_Leon
Occasional Contributor

Hi @JohnPlunkett , was trying it in AGOL last year.... just tried again now and the domain names are displaying correctly on the pop-ups on the "New Map Viewer" and also when it used in WAB & Experience Builder... Good to know, thank you....

View solution in original post

6 Replies
KenBuja
MVP Esteemed 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
Occasional Contributor

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 Esteemed 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
kmsmikrud
Occasional Contributor III

Wow you nailed the issue right away with the domains in the arcade. I went back and forth between classic and the new map viewer and couldn't figure out what is going on. Did you figure out a work around or submit a tech case on this? If not I will submit one and reference your post. What a bummer on this.

0 Kudos
JohnPlunkett
Esri Contributor

Were you using ArcGIS Online or Enterprise 10.9.1 - It appears to be working for me

0 Kudos
Ramon_de_Leon
Occasional Contributor

Hi @JohnPlunkett , was trying it in AGOL last year.... just tried again now and the domain names are displaying correctly on the pop-ups on the "New Map Viewer" and also when it used in WAB & Experience Builder... Good to know, thank you....