Skip to main content
Question

How can I use the string "$()" in a parameter or feature attribute?


chk1
Contributor
Forum|alt.badge.img+7
  • Contributor

I'm trying to use a string that contains 

$()


 (dollar, left parenthesis, right paranthesis) via a published parameter in a HTTPCaller.

I'm having trouble using a text/string like that because, depending on the transformers used,

  • either the part "$()" simply disappears, or
  • FME throws an error: "Undefined macro `' dereferenced"

I tried to create a feature using the PythonCreator and also Creator + AttributeCreator, however both fail with the error mentioned above. Screenshot of my test workspace:

0684Q00000ArE2KQAV.png

I thought about escaping the string but that didn't work either (no error, but backslashes "\" remain in the text):

\$()
\$\(\)

What is the right encoding or escaping sequence here? 

I tested FME Desktop 2015.1 and 2016.0. 

3 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 29, 2017

This worked (but is not the nicest solution):


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • May 29, 2017

Hi @chk1, try changing the parameter type to Text (Mutiline).


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • May 30, 2017
takashi wrote:

Hi @chk1, try changing the parameter type to Text (Mutiline).

oops, the workaround using Text (Multiline) type parameter seems to be available in FME 2016.1 or later. In 2016.0 and earlier, a Text (Multiline) type parameter causes the error too...

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings