You can use the ListElementCounter to find the last position, which you can then use in the AttributeCreator. Example, assuming your list is called "list{}":
You can use the ListElementCounter to find the last position, which you can then use in the AttributeCreator. Example, assuming your list is called "list{}":
Of course! I didn't see it in the popup specifying "input a number" and didn't think of this manual way to do it. Good call - this should work.
Â
Â
However, I can't get it to "evaluate" properly? Instead, it creates an attribute called list{@Value(_element_count)}
Â
Â
Of course! I didn't see it in the popup specifying "input a number" and didn't think of this manual way to do it. Good call - this should work.
Â
Â
However, I can't get it to "evaluate" properly? Instead, it creates an attribute called list{@Value(_element_count)}
Â
Â
Which version of FME are you using? I tested with FME 2016.1.3.1.
Â
Â
Which version of FME are you using? I tested with FME 2016.1.3.1.
Â
Â
Okay, now it works here too. However, it also exposes an attribute called list{@Value(count)}, which confused me. Thanks, David!
Which version of FME are you using? I tested with FME 2016.1.3.1.
Â
Â
Yes, the exposed list{@Value(count)} annoys us a bit.
Â
For what it's worth, if you want to avoid to expose it, and also do not use Python, Tcl scripting would be an alternative. Assuming an attribute called "_newValue" stores the new value to be appended to the "_list{}".
Â
Tcl Expression for a TclCaller
Â
FME_SetAttribute _list{iFME_Execute NumElements _list{}]} >FME_GetAttribute _newValue]
FME Function call in an FMEFunctionCaller
Â
@Tcl2("FME_SetAttribute _list{ FME_Execute NumElements _list{}]} @Value(_newValue)")
YES, I know you don't like to use Tcl, @david_r ;-)