AnsweredAssumed Answered

Is it possible to add a block of formatted text to a webmap popup using Arcade 'if/else' expression?

Question asked by zakbaron on Jun 25, 2019
Latest reply on Jun 25, 2019 by zakbaron

Hello, 

 

The map in question will be published through AGOL. I have a web map with a number of zones that are swept by a street sweeper. My goal is for the user to click on a given zone and get the schedule for that zone.  The schedule has been worked out for the next year and a half and each zone's schedule has been listed and formatted in text. Like this:

"

Route 11

This route is swept on the following Fridays between 3am and 11am:

Friday, June 7, 2019

Friday, July 12, 2019

Friday, August 16, 2019

Friday, September 20, 2019

Friday, October 25, 2019

Friday, November 29, 2019

Friday, January 3, 2020

Friday, February 7, 2020

Friday, March 13, 2020

Friday, April 17, 2020

Friday, May 22, 2020

Friday, June 26, 2020

Friday, July 31, 2020

Friday, September 4, 2020

Friday, October 9, 2020

Friday, November 13, 2020

Friday, December 18, 2020

 

This schedule may change if the sweeper truck is needed to respond to other situations like storms or accidents. The schedule may also be affected by holidays and staffing availability.

Please note that not every street in any given sweeper zone is swept. Only the streets highlighted on the map are included in the route. The most common reasons for streets not being included are either that they are private, or too steep, narrow or windy for the sweeper truck to maneuver."

 

What I would like to do is write an Arcade statement that says if the Route Id is 11 return 'This big block of formatted text'

else if Route ID is 8 return 'This other big block of text', etc, etc. 

I believe the problem is the multi-line nature of the text. Is there any way around this? 

 

I considered using a StoryMap and putting each zone/schedule in its own tab, but although a tab can link to a feature, a feature cannot open a given tab--at least not to my knowledge and not in AGOL. Maybe in Portal with custom code, but that is not available to me.  

Thoughts?

 

Thanks, 

 

Zak--

Outcomes