When a ParameterFetcher (or AttributeCreator/Manager) is used to obtain the values of a "Choice (Multiple)" published parameter the result is a space-delimited string. However, when any of the published parameter choices contain spaces the values are wrapped in double quotes. If there are no spaces in the choice value then it is not wrapped in quotes. This makes extracting the actual chosen values problematic in an FME workspace.
As an example, if my published parameter choice values are:
- 'a a'
- 'b'
- 'c c'
Then the ParameterFetcher would return an attribute with a string containing:
- "a a" b "c c"
It is not a simple task to retrieve the individual choice values from this string. The AttributeSplitter will not work because the delimiter <space> can appear in the quoted strings. A simple regex is not easy to construct because not all values are quoted. The simplest solution seems to be a TCLCaller or PythonCaller but this is not easy for someone with limited programming experience.
My idea suggestion is to make accessing these values easier. To do this I would propose two alternative solutions:
- wrap all values in quotes, even if they do not contain spaces, to make constructing a regex simpler;
- enhance the ParameterFetcher to return an FME list of the choice values.