Comments and answers for "Create attribute in loop with counter number in its name" https://knowledge.亚搏在线safe.com/questions/82004/create-attribute-in-loop-with-counter.html The latest comments and answers for the question "Create attribute in loop with counter number in its name" Comment by jeroen on jeroen's answer https://knowledge.safe.com/comments/82043/view.html

Schemasetter did the trick.

For the formatting: @Evaluate(@round(@add(@Value(loopCounter),1),0))

Wed, 07 Nov 2018 16:02:44 GMT jeroen
Answer by jdh https://knowledge.safe.com/answers/82034/view.html

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.

Wed, 07 Nov 2018 15:48:17 GMT jdh
Comment by jeroen on jeroen's answer https://knowledge.safe.com/comments/82029/view.html

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))

Wed, 07 Nov 2018 15:37:12 GMT jeroen
Answer by ebygomm https://knowledge.safe.com/answers/82025/view.html

It doesn't look like you are exposing the new attribute names?


Wed, 07 Nov 2018 15:27:57 GMT ebygomm
Comment by jeroen on jeroen's answer https://knowledge.safe.com/comments/82023/view.html

reuploaded the file.Also the image was missing now...hope it works now or it could be that the forum has a hard time.

Wed, 07 Nov 2018 15:22:32 GMT jeroen
Answer by jdh https://knowledge.safe.com/answers/82017/view.html

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.

Wed, 07 Nov 2018 15:00:50 GMT jdh
Comment by jeroen https://knowledge.safe.com/comments/82012/view.html

Corrected the x = 2 into x = 3 to match the named outcome correctly.

Wed, 07 Nov 2018 14:35:14 GMT jeroen
Comment by jeroen on jeroen's comment https://knowledge.safe.com/comments/82011/view.html

This should work now.Do not know what the problem was but i re-uploaded the file.

Wed, 07 Nov 2018 14:33:46 GMT jeroen
Comment by takashi https://knowledge.safe.com/comments/82009/view.html

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?

Wed, 07 Nov 2018 14:25:09 GMT takashi