Hi @ftl,
You can use the AttributeExposer transformer to allow this attribute value to be used downstream in the workspace.
Live Chat should be available 9-12 and 1-4pm PST the majority of the time. Occasionally there are internal events that mean this time can get short but this happens very rarely.
Hi @ftl,
You can use the AttributeExposer transformer to allow this attribute value to be used downstream in the workspace.
Live Chat should be available 9-12 and 1-4pm PST the majority of the time. Occasionally there are internal events that mean this time can get short but this happens very rarely.
Thanks @hollyatsafe, but when i use AttributeExposer and copy paste the name who apear in the inspector at attributeExposer, the value, when execute the workflow, are missing. no apear value.
Thanks @hollyatsafe, but when i use AttributeExposer and copy paste the name who apear in the inspector at attributeExposer, the value, when execute the workflow, are missing. no apear value.
Hi @ftl,
When you copy the attribute name over do not include the test in the brackets after .Count. I've attached a .fmw that shows this working.
none2none.fmw
Hi @ftl,
When you copy the attribute name over do not include the test in the brackets after .Count. I've attached a .fmw that shows this working.
none2none.fmw
Hi @hollyatsafe, in the example that you have sent me the same as me, the exposer attribute appears as missing in the attribute table
The attribute name "Loop to DistanceChopper_LOOP_..." has been generated at run-time and it could be different for each run. If you want to use the attribute value in the subsequent workflow, implicitly rename it with the BulkAttributeRenamer and expose the resulting attribute name ('_loop_count' in the example below).
- Action: Regular Expression Replace
- Mode: Rename
- Text To Find (regular expression): Loop to DistanceChopper_LOOP_Entrance\\d+ Input.+
- String: _loop_count

Just be aware you would have to modify the regular expression if you edited the Transformer Name of the DistanceChopper transformer, since the attribute name contains the transformer name as its part. Further, it may not be guaranteed the name will be the same in future versions of FME.
I would recommend you to consider another solution without using the "Loop to DistanceChopper..." attribute as much as possible.
@ftl
That parameter resists being exposed indeed.
Either remove the attribute __parts from the attribute remover (let the attribute pass)
or
Add a topologybuilder after the DistanceChopper, all parts are now enumerated. No exposure required.
I use this to do that with some options...nputscreen

The customtransformer

Workbench, attr-creator for initialising some attributes.
@ftl
I forgot the conditionals in the creator

Hi @hollyatsafe, in the example that you have sent me the same as me, the exposer attribute appears as missing in the attribute table
Hi @ftl,
I was using 'Run with Feature Caching' during my testing so I didn't hit the issue of the attribute name changing each run - it looks like Takashi's suggestion using Regex would be better here.
Hi @ftl,
For your workflow, I would recommend using CHOPPER transformer instead with combination of LENGTHCALCULATOR and Counter, you can easily achieve the neccessary result.

Also, use this workspace as starting point.
DistanceChopper_Test.fmw