Skip to main content
Solved

Add attribute value as prefix

  • November 14, 2016
  • 6 replies
  • 181 views

Forum|alt.badge.img

Hi,

I am trying add attribute value as prefix to joined attributes, but I have not succeeded. @bo had quite similar problem Add parameter as prefix...

 

I have created attributes at main.

Then I expose those attributes at custom transformer

But I cant get prefix when I add Joiner

Goal is to have 1_REGISTRATIONDATE, 1_FORMERPARCELLOCUNITID and 2_REGISTRATIONDATE, 2_FORMERPARCELLOCUNITID on the second round and so on.

Best answer by redgeographics

I'm assuming you want to use a custom transformer to loop through the join several times and add a prefix to the resulting attributes based on the loop counter, correct?

If you don't use a prefix in your Joiner but instead use a BulkAttributeRenamer inside your custom transformer it should work.

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.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • November 14, 2016

I'm assuming you want to use a custom transformer to loop through the join several times and add a prefix to the resulting attributes based on the loop counter, correct?

If you don't use a prefix in your Joiner but instead use a BulkAttributeRenamer inside your custom transformer it should work.


Forum|alt.badge.img
  • Author
  • November 14, 2016

Correct.

I have tried that, but it didnt work. I also lost values.

I dont know which of there is correct way, but neither works.


redgeographics
Celebrity
Forum|alt.badge.img+62

I got it to work with an attribute. Here's my sample, maybe it's useful.

attr-prefix.fmwt


Forum|alt.badge.img
  • Author
  • November 15, 2016

Thank you, but that does not help. Here is result what I get with your workspace


redgeographics
Celebrity
Forum|alt.badge.img+62

The table view won't accurately reflect this because it's a fixed schema, in your case not all attributes exist on all features. Does the main Feature Information panel show the correct values?


Forum|alt.badge.img
  • Author
  • November 15, 2016

Ok. Yes, correct values are at Feature information panel. Thank you!