Or in short: How can I just increase a passed attribute (integer) with a desired number in a custom transformer? I always fail with passing the attribute. 💁🏼♀️
You can use loop to an iterate the attribute certain amount of time so it would increase the attribute or just use pythonCaller with a loop. There is an example in the link below, take a look.
https://safe-software.gitbooks.io/fme-desktop-advanced-training-2018/content/DesktopAdvanced5CustomTransformers/5.11.CustomTransformerLoops.html
No, I don't need a loop. I just want to add a number.
In the meantime I tried to use the PythonCaller. It works quite good. But when I use the custom transformer twice in a row (as I want to add the number to two different attributes) it doesn't work. The first attribute gets the double addition. 😶
I really want to help but your question is not clear for me. Can you provide an example of input data and output data?
Well, I already did, but might not be specific enough.
I cannot provide the original data. So I tried to minimize the problem and used some dummy transformers.
So here is an example workspace with and without custom transformer.