Solved

Join 2 columns

  • 5 January 2017
  • 6 replies
  • 69 views

Hello All,

I have 2 columns that I need to merge into one. Columns are different attributes of a single feature class.

If Address 1 has populated field, then they are accepted. If Address 1 is null, then Address 2 is checked and information from that column will be copied to Address 1. If both columns are populated, Address 1 is accepted.

Any ideas of how I would do that? Any help would be appreciated. Thanks

icon

Best answer by ebygomm 5 January 2017, 15:09

View original

6 replies

Userlevel 1
Badge +21

An attributecreator with a conditional value can be used here. If Address1 has a value do nothing, otherwise make Address1 equal Address2

An attributecreator with a conditional value can be used here. If Address1 has a value do nothing, otherwise make Address1 equal Address2

Thanks for that suggestion. Can you elaborate a bit more please. I cannot find much help on using AttributeCreator with conditions

 

Badge +7

Hi @fariyafarhad

 

You can use an AttributeCreator and create a new attribute with the name 'Address1'. This new attribute will overwrite the old one. As value, you choose the option 'Conditional Value' which opens a new window in which you can enter a Test condition and an Output value.

TEST: If Address1 has a value, OUTPUT: Address1

ELSE OUTPUT: Address2

If something is not clear, I will be happy to help!

Good luck!

An attributecreator with a conditional value can be used here. If Address1 has a value do nothing, otherwise make Address1 equal Address2

Thanks egomm, I just learned the use of conditions within attributecreator :D

 

 

Hi @fariyafarhad

 

You can use an AttributeCreator and create a new attribute with the name 'Address1'. This new attribute will overwrite the old one. As value, you choose the option 'Conditional Value' which opens a new window in which you can enter a Test condition and an Output value.

TEST: If Address1 has a value, OUTPUT: Address1

ELSE OUTPUT: Address2

If something is not clear, I will be happy to help!

Good luck!

Thank you for the answer @jeroenstiers!

 

 

Userlevel 4

Another option is to use the NullAttributeMapper, I find it slightly easier to read when reopening a workspace later on as you don't have to click through 2 dialogs to see what's going on:

Reply