Hello, i have a problem with the stringconcatenator. i would like to combine several values of text attributes with the stringconcatenator as a new attribute. the values should be separated by a comma, empty attributes should be ignored and there must be no comma at the end. how can this be achieved? I always get two or more comms if the attribute is emtpy. Thanks a lot.
Solved
combine text values with the stringconcatenator and ignore emtpy values
Best answer by dustin
You can follow the StringConcatentor with two StringReplacers:
One using the following regex, replacing with a single comma.
,{2,}The second StringReplacer will replace any remaining comma at the end with blank string using
,$
Alternatively, you can do this in a single AttributeCreator using the following string:

@ReplaceRegularExpression(@ReplaceRegularExpression(@Value(att),",{2,}",",",caseSensitive=TRUE),",$","",caseSensitive=TRUE)This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Login to the community
No account yet? Create an account
An FME Account is required to contribute
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.


