Skip to main content
Solved

multiple rows to one row with dynamic columns

  • September 1, 2021
  • 1 reply
  • 51 views

How can i do this? I tried everything i could.

The number of columns needs to be dynamic.. if Town III is 5 times then there should be JB5 ZB5 and RT5.

The RT1 Column is the Order in which they should be (see colour)

col

Best answer by geomancer

The custom transformer ListBreaker from FME Hub may be what you want. You will have to expose the new attributes. See the attached workspace (FME 2020.0).

ListBreakerSteps:

  1. Rename attributes JB1, ZB1 and RT1 to JB, ZB and RT
  2. Create a list, grouping on attribute JB
  3. Sort the list on attribute RT
  4. Use the ListBreaker to write the list to new attributes, start numbering at 1, no numbering prefix
  5. Expose the attributes. You set the order of the attributes here
  6. Remove the superfluous attributes JB, ZB and RT, and the list
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.

1 reply

geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • Best Answer
  • September 2, 2021

The custom transformer ListBreaker from FME Hub may be what you want. You will have to expose the new attributes. See the attached workspace (FME 2020.0).

ListBreakerSteps:

  1. Rename attributes JB1, ZB1 and RT1 to JB, ZB and RT
  2. Create a list, grouping on attribute JB
  3. Sort the list on attribute RT
  4. Use the ListBreaker to write the list to new attributes, start numbering at 1, no numbering prefix
  5. Expose the attributes. You set the order of the attributes here
  6. Remove the superfluous attributes JB, ZB and RT, and the list