Skip to main content
Question

Looping features into a random attribute value creator

  • January 5, 2017
  • 4 replies
  • 93 views

geospatiallover
Participant
Forum|alt.badge.img+6

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • 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+46
  • Influencer
  • January 5, 2017

No need to loop you could do in line


takashi
Celebrity
  • 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.


geospatiallover
Participant
Forum|alt.badge.img+6

Thanks to everyone who replied.