Skip to main content
Question

How to populate a field with a value from a specific field identified in another field

  • May 11, 2018
  • 4 replies
  • 255 views

dvanriel
Contributor
Forum|alt.badge.img+9

I am trying to populate a new field with a value from another field. It is not a simple attribute copy. Each record is getting the value from a different field that is specified in another field.

For example: I have the table below and I want to populate NEW_FIELD with one of the values of fields FIELD1 through FIELD4 based on what is provided in FIELD_TO_USE. This has to be dynamic (no hard coded TestFilter as I am doing that now).

FIELD1FIELD2FIELD3FIELD4FIELD_TO_USENEW_FIELD1234FIELD115678FIELD26ABCDFIELD3CEFGHFIELD4H
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
  • May 11, 2018

AttributeCreator with:

New attribute NEW_FIELD

Value @Value(@Value(FIELD_TO_USE))


takashi
Celebrity
  • May 11, 2018

Alternatively, the AttributeDereferencer could also be used here.


dvanriel
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • May 14, 2018

AttributeCreator with:

New attribute NEW_FIELD

Value @Value(@Value(FIELD_TO_USE))

Thanks Erik!

 

 


dvanriel
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • May 14, 2018

Alternatively, the AttributeDereferencer could also be used here.

Thanks Takashi. I don't know which method I will use. They are both one transformer.

 

 

It feels like I learn a new transformer every week.