<?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 Spatial Analyst: calculate value: escaping of % character in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/spatial-analyst-calculate-value-escaping-of/m-p/278790#M3937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use calculate value (9.3) in order to build a certain string. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result should be: '%value_of_variable%' (note that I want the `%` to be present *after* the in-line variable substitution)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I created a simple model (Screenshot). My problem is that for the following expressions I get the following results (with the value of String as Hello):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My first try gives a&amp;nbsp; result as expected (in-line variable substitution)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 1: '%String%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 1: Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 2: '%%String%%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 2: %%String%% &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh well - why? If %% was an escape sequence the result should give %String% and not %%String%%, or am I wrong? And where is this behaviour documented?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Third try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 3: '%%%String%%%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 3: %%Hello%%&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, almost. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how is it possible to get %Hello% in my example?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 07:31:02 GMT</pubDate>
    <dc:creator>KarlOrmer</dc:creator>
    <dc:date>2010-08-11T07:31:02Z</dc:date>
    <item>
      <title>Spatial Analyst: calculate value: escaping of % character</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/spatial-analyst-calculate-value-escaping-of/m-p/278790#M3937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use calculate value (9.3) in order to build a certain string. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result should be: '%value_of_variable%' (note that I want the `%` to be present *after* the in-line variable substitution)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I created a simple model (Screenshot). My problem is that for the following expressions I get the following results (with the value of String as Hello):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My first try gives a&amp;nbsp; result as expected (in-line variable substitution)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 1: '%String%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 1: Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 2: '%%String%%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 2: %%String%% &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh well - why? If %% was an escape sequence the result should give %String% and not %%String%%, or am I wrong? And where is this behaviour documented?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Third try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression 3: '%%%String%%%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result 3: %%Hello%%&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, almost. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how is it possible to get %Hello% in my example?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 07:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/spatial-analyst-calculate-value-escaping-of/m-p/278790#M3937</guid>
      <dc:creator>KarlOrmer</dc:creator>
      <dc:date>2010-08-11T07:31:02Z</dc:date>
    </item>
  </channel>
</rss>

