I was able to do it by using ListExploder and use Attribute Creator to create new attribute call combine and then put it back together using ListBuilder with Group Processing using ObjectID (or any unique number to that feature)
I compare the line after it put back together to make sure that element index actually go back to the correct place and it seem like it does (But definitely randomly check it in your case just to make sure)
Â
Hi! Thanks for your answer. It work very well. Do you think it's possible to add a new attribute list using Python, to avoid geometry manipulation?
Hi! Thanks for your answer. It work very well. Do you think it's possible to add a new attribute list using Python, to avoid geometry manipulation?
Hi @alc33​ ,
PythonCaller with this script might help you.
class FeatureProcessor(object):
    def __init__(self):
        pass
       Â
    def input(self, feature: fmeobjects.FMEFeature):
        xs = feature.getAttribute('coord{}.x')
        ys = feature.getAttribute('coord{}.y')
        feature.setAttribute('coord{}.all', '%s;%s' % (x, y) for x, y in zip(xs, ys)])
        self.pyoutput(feature)
Â
    def has_support_for(self, support_type: int):
        return support_type == fmeobjects.FME_SUPPORT_FEATURE_TABLE_SHIM
 Â
    def close(self):
        pass
Â
    def process_group(self):
        pass
Â
Â
Hi @alc33​ ,
PythonCaller with this script might help you.
class FeatureProcessor(object):
    def __init__(self):
        pass
       Â
    def input(self, feature: fmeobjects.FMEFeature):
        xs = feature.getAttribute('coord{}.x')
        ys = feature.getAttribute('coord{}.y')
        feature.setAttribute('coord{}.all', o'%s;%s' % (x, y) for x, y in zip(xs, ys)])
        self.pyoutput(feature)
Â
    def has_support_for(self, support_type: int):
        return support_type == fmeobjects.FME_SUPPORT_FEATURE_TABLE_SHIM
 Â
    def close(self):
        pass
Â
    def process_group(self):
        pass
Â
Â
@Takashi Iijima​ thanks for your answer !
I'm sorry but I have a termination message and I don't understand why?
I'm using FME 2020.2 and python 3.7+
Thank you.
Â
Â
Hi @alc33​ ,
PythonCaller with this script might help you.
class FeatureProcessor(object):
    def __init__(self):
        pass
       Â
    def input(self, feature: fmeobjects.FMEFeature):
        xs = feature.getAttribute('coord{}.x')
        ys = feature.getAttribute('coord{}.y')
        feature.setAttribute('coord{}.all', o'%s;%s' % (x, y) for x, y in zip(xs, ys)])
        self.pyoutput(feature)
Â
    def has_support_for(self, support_type: int):
        return support_type == fmeobjects.FME_SUPPORT_FEATURE_TABLE_SHIM
 Â
    def close(self):
        pass
Â
    def process_group(self):
        pass
Â
Â
I think the script should work in FME 2020 too.
Most likely you have not created xs and ys (lists of x values and y values) from "coord{}.x" and "coord{}.y".
Check if these two lines are correct.Â
        xs = feature.getAttribute('coord{}.x')
        ys = feature.getAttribute('coord{}.y')
Â
Hi @alc33​ ,
PythonCaller with this script might help you.
class FeatureProcessor(object):
    def __init__(self):
        pass
       Â
    def input(self, feature: fmeobjects.FMEFeature):
        xs = feature.getAttribute('coord{}.x')
        ys = feature.getAttribute('coord{}.y')
        feature.setAttribute('coord{}.all', o'%s;%s' % (x, y) for x, y in zip(xs, ys)])
        self.pyoutput(feature)
Â
    def has_support_for(self, support_type: int):
        return support_type == fmeobjects.FME_SUPPORT_FEATURE_TABLE_SHIM
 Â
    def close(self):
        pass
Â
    def process_group(self):
        pass
Â
Â
You are right, the name of the list was different. It work very well! Thank you !
thank you very much @panda​ @Takashi Iijima​ !
Just a precision for the person that aren't used to use pythoncaller (like me ). Before the code above you have to write :
import fme
import fmeobjects
This 2 lines are in the transformer at his opening.
Â
And then, to see the new attribute in the others transformers, you have to use AttribueExposer.