Post

2 followers Follow
1
Avatar

Append data in Column A with Column B, and create results Column C

Via the Edit > Append Columns menu item, the user would be prompted to select Column A, aka the left side of the Append, and select Column B, aka the right side of the Append.  User may then optionally populate the 'Separator' text field with any number, letter, character, white space, word, or words s/he so desires to be inserted in-between the data from Column A and the data from Column B, e.g.- ColumnAData(FirstName) + SeparatorData(single space) + ColumnBData(LastName) = "FirstName LastName" in resulting Column C.

Additional options may also include prefix and suffix Appending, wherein user adds letter, number, word, etc. to one/both Append options, and that data is also added to the resulting Column C.  Continuing with the above example, user could add "Mr." to the Prefix Append text field, and "Sr." to the Suffix Append text field, thus resulting in "Mr. FirstName LastName Sr." in resulting Column C.

Additional options may include;

  1. Delete the source Column A and Column B after the Append is completed resulting in Column C.
  2. Create New Layer with resulting Column C.
  3. Create New Layer with Column A, Column B, and resulting Column C.
  4. and so forth.

 

Thank you,

Eric Jarvies

Eric Jarvies

Please sign in to leave a comment.

3 comments

0
Avatar

One thought on this it to use calculated columns to simulate this effect.    For example, if you had columns:

| FirstName
| LastName
| Honorific
|
| George
| Jetson
| Mr.
|
| Jane
| Jetson
| Mrs.
|

Create a column in the Layer Info window and use the Set Formula… button.   Then, in the provided area, drag the columns into the space provided, adding spaces and making other changes by using the string operations.   For example,

LastName+", "+FirstName

or

Honorific+" "+FirstName+" "+LastName

Which would yield:

 

| FirstName
| LastName
| Honorific
| First Calculation
| Second Calculation
|
| George
| Jetson
| Mr.
| Jetson, George
| Mr. George Jetson
|
| Jane
| Jetson
| Mrs.
| Jetson, Jane
| Mrs. Jane Jetson
|

Gaige B Paulsen 0 votes
Comment actions Permalink
0
Avatar

Yes... would work for me!  Anything to avoid having to do these otherwise fairly simple operations in some other app, which means exporting, importing, etc.

 

Thanks,

 

Eric Jarvies

Eric Jarvies 0 votes
Comment actions Permalink
0
Avatar

Cartographica 1.4 contains much improved access to python's string libraries as well, making possible things like title caps, etc. without having to implement them manually.

Gaige B Paulsen 0 votes
Comment actions Permalink