Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Merge two columns with a separator in the middle

MH5
6 - Meteoroid

Hello, 

 

I want to merge to columns from the same file with a separator in the middle '|' but I'm having an error message. 

MH5_0-1581502474671.png

 

MH5_1-1581502484135.png

 

I'm using version 2019.1.6.58192 and I was working on a more recent one before with the same formula.

The expected outcome would be something like 111111|222222 (No letters)

 

Many thanks for the help

6 REPLIES 6
DiegoParker
10 - Fireball

Hi MH5,

 

Make sure to put your pipe in between speech marks "|" also make sure both fields are string fields.

 

It should be [LE ID] + "|" + [ASSOCIATED_LE_ID] 

 

Hope this helps If does, can I ask you to mark it as the solution? this will help other users to find it and will allow us to close the thread. Many thanks!

 

Best,

Diego

MH5
6 - Meteoroid

Hi @DiegoParker , 

 

I've tried that too, it didn't work unfortunately

 

Thanks, 

DiegoParker
10 - Fireball

@MH5  Is there any chance you can upload your workflow? It should have worked and without having a look at it more closely I won't be able to figure why it didn't. Thanks!

Jonathan-Sherman
15 - Aurora
15 - Aurora

HI @MH5,

 

My guess would be at least one of your fields is a numeric data type and not a string. We can convert numeric fields to string data types using the ToString() function. For safety (and because I don't know your data types) i've wrapped both fields with the ToString() function in the below formula:

 

ToString([LE ID]) + "|" + ToString([ASSOCIATED_LE_ID])

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

MH5
6 - Meteoroid

Thanks @DiegoParker  & @Jonathan-Sherman for your help

QuarterHorse
5 - Atom

Thank you for the inclusion of ToString()!  It's really helpful to create the concatenations directly in Alteryx rather than having to do it in Excel.

Labels
Top Solution Authors