span8
span4
span8
span4
I'm trying to create multiple attributes during a loop depending on the amount X.If x = 3 the attributes created should be Foto_doc,Foto_doc2 and Foto_doc3.
I have a working flow with loop in the below example but the attribute creator does not work correctly with the @value(attribute_name) option.Is there something missing in this flow or is it not possible to use attribute values for naming attributes during a loop?
The image and the workspace you have posted cannot be accessed for some reason.Could you please make sure that those have been uploaded correctly?
Dynamically named attributes cannot be automatically exposed on the canvas and used by other transformers.
You can write them to a format if you use the SchemaSetter custom transformer and a writer set to Dynamic Schema Definition.
Personally I wouldn't use a loop at all,just a Cloner set to Max_Images,and build the attribute name from the _copynum attribute.This would also avoid the formatting issues of 2.0,3.0,though that could be taken care of using the StringFormatter.
It doesn't look like you are exposing the new attribute names?
Thanks!Forgot that attributes could be hidden.The attribute exposer does not allow a value from attribute as input.But with manual inspection in the data inspector I can now see that the attributes are created but not showed in the endresult.Also the format is not what i would like.
Also: to solve the 2.0,3.0 I used @Evaluate(@round(@add(@Value(loopCounter),1),0))
Like Takashi I cannot access your workspace,but in situations where @Value(attribute_name) hasn't worked in the past (double check that it's a capital V),I've had success with FMEFunctionCaller using the @SupplyAttributes(attrName,attrValue) function.
© 2019 亚搏在线Safe Software Inc |Legal