Question

Looping features into a random attribute value creator

  • 5 January 2017
  • 4 replies
  • 13 views

Badge +5

I bookmarked a group of transformers that will create a random attribute value of fixed length and a text format of T######## (where T is a random capital letter and # is a random number between 0-9). I used an unconditional featureMerger to merge the value to my features . I need to be able to loop each feature into the bookmark so I can generate random value for each feature in the transformer.

With my current workspace I can only pass one value to each feature. Workspace below.


4 replies

Userlevel 2
Badge +16

Do you know the RandomNumberGenerator transformer that exists in the Transformer Gallery?

That should help in this case without the need of looping.

Userlevel 1
Badge +21

No need to loop you could do in line

Userlevel 2
Badge +17

Hi @geospatiallover, I would create a random capital character with a RandomNumberGenerator and a CharacterCoderRepacer, create random eight digits with another RondomNumberGenerator and a StringFormatter, and finally concatenate them with a StringConcatenator.

Badge +5

Thanks to everyone who replied.

Reply