Spatial Analyst: calculate value: escaping of % character

Discussion created by _garret_ on Aug 11, 2010
Hi all,

I want to use calculate value (9.3) in order to build a certain string.

The result should be: '%value_of_variable%' (note that I want the `%` to be present *after* the in-line variable substitution)

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):

My first try gives a  result as expected (in-line variable substitution)
Expression 1: '%String%'
Result 1: Hello

Second try:
Expression 2: '%%String%%'
Result 2: %%String%%

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?

Third try:
Expression 3: '%%%String%%%'
Result 3: %%Hello%%

Well, almost.

So how is it possible to get %Hello% in my example?