Solved

Attribute Manger to concat fields based on conditions

  • 19 September 2019
  • 2 replies
  • 5 views

Badge +1

So in my workspace I read in an Access mdb file in. Run it through two attributesplitters transformers to

split the BlockNO and LotNo fields

I the have an AttributeManager transformer setup where I try to clean up and conact the fields back together. I do this be creating 2 new attributes Block and Lot an using a condition statement to reassemble the pieces like this

However I can't format the if correctly, every case false and goes to the Else statement producing this type of output

The "." with no value after it is what I am trying to avoid.

 

Any help would be appreciated.

 

Chris M

icon

Best answer by ebygomm 19 September 2019, 18:21

View original

2 replies

Userlevel 1
Badge +21

I would test for Attribute has Value rather than attribute is null

 

So if attribute Blk_List{1} has value concatenate the items together, otherwise just use Blk_List{0}

Userlevel 2
Badge +16

Before you do the concatenation, you can use a StringReplacer on both Block and Lot to replace (regex) .$ by nothing.

The .$ will only remove a . at the end of the string.

This should go right before the AttributeSplitter transformers.

Hope this helps.

Reply