Hi, I am a newbie in Alteryx and need help even with the simplest operation. How do I combine 3 fields (first name, last name, title in columns A, B and C) and populate the full name in a prespecified empty column (column D)
Solved! Go to Solution.
Hey @Debashiss, for combining string elements like this you can simply 'add' them together with +. You'll want to put some spaces in there as well though so if you place a Formula tool on your canvas and select [Column D] from the dropdown (as you're amending this), you can just use an expression like so:
[Column C]+' '+[Column A]+' '+[Column B]
I've assumed you wanted it in the format of title - first name - last name, but obviously feel free to rearrange if not. Hope this helps!
Never mind @DataNath. I think it's because I hadn't completed an output path. Now it works. Thank you SO much. Have a good weekend.
Hey @Debashiss, from your 'Dataview' screenshot I can see that you're looking at the input anchor of the Formula tool i.e. what is going in before your expression runs (the blank field). If you hit the green anchor on the right hand side of the tool (output) you'll be able to see the new, populated field after the expression! Can also press here in the results window (red box):
So, now there is another problem. In My input dataset there are records with first, last and title populated and essentially I am populating the full name column by combining them. But there are also records where full names are populated with but corresponding first, last, and title are blank. this workflow logic (not finding any value for those ABC columns is yielding null for the full name column. I tried to go around it by doing the following:
if [PROVIDER_FIRST_NAME] ==!" " or [PROVIDER_LAST_NAME] ==!" " or [PROVIDER_TITLE]==!" "
then
[PROVIDER_LAST_NAME]=[PROVIDER_FIRST_NAME]+" "+ [PROVIDER_LAST_NAME]+" "+[PROVIDER_TITLE]
But it is spitting out errors:
@DataNath, I am all set. Thank you so much.
Open your workflow in Alteryx.
Drag and drop a Formula tool onto your canvas.
Connect it to your input data.
In the Formula tool configuration, you can create a new field in Column D by combining the values from Columns A, B, and C.
Click on the OK button to apply the formula.
Now, your workflow should have a new column (Column D) containing the full names based on the combination of the values in Columns A, B, and C.