Solved

Add attribute value as prefix

  • 14 November 2016
  • 6 replies
  • 28 views

Badge

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.

icon

Best answer by redgeographics 14 November 2016, 15:08

View original

6 replies

Userlevel 4
Badge +25

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.

Badge

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.

Userlevel 4
Badge +25

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

attr-prefix.fmwt

Badge

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

Userlevel 4
Badge +25

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?

Badge

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

Reply