Skip to main content

Unable to pass text containing quotes via workspace runner user parameter


spatialexjames
Contributor
Forum|alt.badge.img+10

I think I may have run into unexpected behaviour. I’m trying to pass some text in a user parameter via a workspace runner but it’s stripping out the quotes within the text when I try to retrieve it.

The text I am trying to pass through to a child workspace:

"Building_Use" = 'Residential'

In the log of the workspace runner it gets passed along in the command line arguments as:

--SQL_WHERE_Clause {${="Building_Use" = 'Residential'=}}'

and the child workspace receives it correctly when initiating the workbench as:

``--SQL_WHERE_Clause' `"Building_Use" = 'Residential''.

But when this is retrieved via a parameter fetcher or attribute creator it drops the quotes in the child workspace:

Building_Use = 'Residential'

However if I run the child workspace on its own (not via the workspace runner) it retrieves the text correctly. 

I can workaround this by replacing “ with another character before and then replacing it within the child-workspace, but I feel this shouldn’t be necessary. I couldn’t find anyone else in the forums with this issue so thought it best to post it here in-case others come across it.

FME(R) 2021.0.0.0 (20210305 - Build 21302 - WIN64)

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Does it work when you url encode and url decode it?


spatialexjames
Contributor
Forum|alt.badge.img+10
nielsgerrits wrote:

Does it work when you url encode and url decode it?

Yeah - that’s the workaround I’m using at the moment but was hoping it wouldn’t be necessary!


nielsgerrits
VIP
Forum|alt.badge.img+54

What is the downside of this workaround? If you want to have it as a parameter and not an attribute, it is probably possible to url decode it using python in a scripted parameter.


Reply


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