Start Free Trial

Alteryx Designer Desktop Discussions

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

Create column for each full path for each input data tool

TheEmeraldKnight
7 - Meteor

Hi all,

 

I have a workflow with four inputs.  I want to have a single column in the output file that shows the full path for each record from the four files that has created the output.  I have set the Output Field Name as Field value to Full Path for each input but can't consolidate them into a single column.  At the moment only the full path from the last file shows.

 

The data is private so I can't load the workflow I'm afraid.

 

Any advice would be welcomed.

 

Regards,

 

Robert

8 REPLIES 8
Qiu
21 - Polaris
21 - Polaris

@TheEmeraldKnight 
You have four full paths, and you want them to be consolidated into one  and output as one  columne in your one output file?

TheEmeraldKnight
7 - Meteor

Hi Qiu,

 

Yes just like this mock example:

 

TheEmeraldKnight_0-1751602276568.png

 

Many thanks,

 

Robert

KGT
13 - Pulsar

This is hard to troubleshoot without at least a screenshot. I do this every day, and it just works. The Input Tool will append it as a column named [FullPath] and that's per record, so will persist.

 

Only thing I can think of is that you're removing the column and then attaching it again...

TheEmeraldKnight
7 - Meteor

Hi KGT,

 

Here is the screen shot of the workflow:

 

TheEmeraldKnight_0-1751612524560.png

 

Hope that helps.

 

Regards,

 

Robert

Genevieve
8 - Asteroid

HI @TheEmeraldKnight 

 

What about something like this.

1 Split by path WF 2025-07-04 145239.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Where you split your Full Path in  a directory and filename, then Crosstab your Directories.

Note I have an older version of Alteryx and need to rename my columns afterwards. Alteryx 2025.1 has the functionality in Crosstab to retain the symbols in column headings.

2 Filename 2025-07-04 145347.png3 Cross tab 2025-07-04 145423.png4 Dynamic rename 2025-07-04 145452.png5 Results 2025-07-04 145536.png1 Directory 2025-07-04 145321.png

 

TheEmeraldKnight
7 - Meteor

Hi Genevieve,

 

Thanks for the reply.

 

I actually just want a single column with the full path (directory + filename) for each record not four columns with the filenames as per your screen shot:

 

TheEmeraldKnight_0-1751685252556.png

 

 

Regards,

 

Robert

KGT
13 - Pulsar

Yep, so the issue is that you're joining rather than unioning (unioning being what I thought was happening), thus creating new fields. I don't know where your data is becoming the field names though.

Easy solution is just a formula at the end:

[FileNameField] == 

IF IsEmpty([FileNameField1]) &&  IsEmpty([FileNameField2])

THEN [FileNameField3]

ELSE....

IF IsEmpty([FileNameField1]) &&  IsEmpty([FileNameField2]) &&  IsEmpty([FileNameField3])

THEN [FileNameField4]

ELSE

Genevieve
8 - Asteroid

Actually there would be an even easier solution.

 

[FilenameALL] =   [FilenameSource1] + [FilenameSource2] + [FilenameSource3] ...

 

If each row only has one source this would be the way.  But considering you are actually using joins you may end up with more than one source file and in that case you will need to decide on the priority.

This is based on the assumption that when you are inputting the data you are also loading the full path. 

Genevieve_0-1751873468675.png

 

 

 

Labels
Top Solution Authors