Esox

Calculate Value Replace Expression

Discussion created by Esox on Aug 22, 2011
Latest reply on Sep 13, 2011 by Esox
Hallo,

I'd like to iterate through a list of values. The values are used as field name inline variables and sql-expression for a select command.

To build the sql statement from the list, I use the calculate value function.
My list elements look like: !0?2,!0?4
I am trying to get the sql-statement by the following command in the calculate Value - tool:
"%Value%".replace("!",""vges>=").replace("?",".")


But I always get an error:

ERROR 000539: Error running expression: "!0?2".replace("!",""vges>=").replace("?",".") <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 1)
Failed to execute (Calculate Value).

What could be the reason?

Attached an overview from the modell builder.

Thanx,

Matthias

Attachments

Outcomes