Skip to main content
Solved

Attribute Manger to concat fields based on conditions

  • September 19, 2019
  • 2 replies
  • 27 views

chris_m
Participant
Forum|alt.badge.img+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

Best answer by ebygomm

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}

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • September 19, 2019

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}


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • September 19, 2019

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings