<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to add a block of formatted text to a webmap popup using Arcade 'if/else' expression? in State &amp; Local Government Questions</title>
    <link>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263708#M1544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding: 0px;"&gt;Hi Zak,&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;You can certainly do this with arcade and an If/Else statement.&amp;nbsp;The line breaks&amp;nbsp;do make it a bit complex but it can be done like this:&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"This route is swept on the following Fridays between 3am and 11am:"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, June 7, 2019"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, July 12, 2019"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, August 16, 2019"&amp;nbsp;+ TextFormatting.NewLine&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;Personally, I like using the "TextFormatting.NewLine" and a line break so&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it is easier to get an idea of what the end product will look like. However, you could just simply keep everything on one line for simplicities sake (ie&amp;nbsp;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"This route is swept on the following Fridays between 3am and 11am:"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, June 7, 2019").&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;You can also take advantage of using variables for standard texts (like the disclaimer at the bottom). This could look something like this:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;EM&gt;var route_11 = "Line 1" + TextFormatting.NewLine + "Line 2"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var standard_text = "Standard Disclaimer"&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;EM&gt;if($feature.RouteID == 11 ){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return route_11 + TextFormatting.NewLine + standard_text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return standard_text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Cheers,&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2019 18:10:04 GMT</pubDate>
    <dc:creator>AndyShoemaker</dc:creator>
    <dc:date>2019-06-25T18:10:04Z</dc:date>
    <item>
      <title>Is it possible to add a block of formatted text to a webmap popup using Arcade 'if/else' expression?</title>
      <link>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263707#M1543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; 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:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Route 11&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This route is swept on the following Fridays between 3am and 11am:&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, June 7, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, July 12, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, August 16, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, September 20, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, October 25, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, November 29, 2019&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, January 3, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, February 7, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, March 13, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, April 17, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, May 22, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, June 26, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, July 31, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, September 4, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, October 9, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, November 13, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;Friday, December 18, 2020&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;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.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;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."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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'&lt;/P&gt;&lt;P&gt;else if Route ID is 8 return 'This other big block of text', etc, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the problem is the multi-line nature of the text. Is there any way around this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zak--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2019 16:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263707#M1543</guid>
      <dc:creator>ZacharyBaron1</dc:creator>
      <dc:date>2019-06-25T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a block of formatted text to a webmap popup using Arcade 'if/else' expression?</title>
      <link>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263708#M1544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding: 0px;"&gt;Hi Zak,&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;You can certainly do this with arcade and an If/Else statement.&amp;nbsp;The line breaks&amp;nbsp;do make it a bit complex but it can be done like this:&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"This route is swept on the following Fridays between 3am and 11am:"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, June 7, 2019"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, July 12, 2019"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, August 16, 2019"&amp;nbsp;+ TextFormatting.NewLine&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;Personally, I like using the "TextFormatting.NewLine" and a line break so&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it is easier to get an idea of what the end product will look like. However, you could just simply keep everything on one line for simplicities sake (ie&amp;nbsp;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"This route is swept on the following Fridays between 3am and 11am:"&amp;nbsp;+ TextFormatting.NewLine +&lt;/EM&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;"Friday, June 7, 2019").&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;You can also take advantage of using variables for standard texts (like the disclaimer at the bottom). This could look something like this:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;EM&gt;var route_11 = "Line 1" + TextFormatting.NewLine + "Line 2"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var standard_text = "Standard Disclaimer"&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;EM&gt;if($feature.RouteID == 11 ){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return route_11 + TextFormatting.NewLine + standard_text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return standard_text&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Cheers,&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2019 18:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263708#M1544</guid>
      <dc:creator>AndyShoemaker</dc:creator>
      <dc:date>2019-06-25T18:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a block of formatted text to a webmap popup using Arcade 'if/else' expression?</title>
      <link>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263709#M1545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That did it for me. I tried the TextFormatting.NewLine earlier, but I forgot to concatenate it...&lt;/P&gt;&lt;P&gt;This is tedious, but once it's done, it's done and the popup will have all the information with no extra clicks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zak--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2019 18:41:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/is-it-possible-to-add-a-block-of-formatted-text-to/m-p/263709#M1545</guid>
      <dc:creator>ZacharyBaron1</dc:creator>
      <dc:date>2019-06-25T18:41:12Z</dc:date>
    </item>
  </channel>
</rss>

