Skip to main content
Question

Looping features into a random attribute value creator


Forum|alt.badge.img+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

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 5, 2017

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

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


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • January 5, 2017

No need to loop you could do in line


takashi
Influencer
  • January 5, 2017

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.


Forum|alt.badge.img+5

Thanks to everyone who replied.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings