Alteryx Designer Desktop Discussions

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

Dynamic field to split

Crete
7 - Meteor

Dear Alteryx community, 

 

hope I have not overlooked a solution on my question. 

 

I receive a txt file every week. For this I have build a workflow that works all fine. But the "Field to Split" in the "Text to columns" tool is dynamic. 

Some information of the "Field to Split" changes every week. 

At the moment I just replace the old field by new field. 

 

Can this process be built into the workflow with some tool I overlooked? 
I have enlcosed a picture illustrating my question. 

 

thank you for your help

 

best

Crete

9 REPLIES 9
Inactive User
Not applicable

Field to split should be based on the rows. I would personally put that column header into the rows. You are splitting the rows into additional columns, that will not work when that value is already in the column header. Push it down to the row level and call that field a generic name (Split Column for example). Then there is no need for a dynamic field.

 

Alternatively, you can use a macro with a control parameter that updates that value in the stream each time and that will solve your dynamic issue.

Crete
7 - Meteor

Dear rayn_lambert, 

 

thank you for your answer. 

The file I receive is a txt file and I want to split into columns, not rows. The file has one column and many rows. The issue is that the header of the the txt file changes every week. And this is the field I use to split into columns

 

When I try to work the the makro I cannot as it does not recognize the txt file. 

 

thank you

Crete

Inactive User
Not applicable

I know you want to split to columns not rows. What I am saying is though you do not need to try and manipulate everything around a changing header row. If you have a single column file coming each day/week/etc, use a text input with a single record, that single record being "Placeholder" or whatever you like. Then do a union with that stream, setting the union by placement not by name. Put this dummy record first, and then use dynamic rename to rename the column; now you have a consistent field name each day/week regardless of what is coming in your text file. Then you do the column parsing and go from there.

 

If your header contains the column names and those are dynamic then you need to push that heading down into the rows and use dynamic rename to put that into the column names after the parsing.

Inactive User
Not applicable

Here is an example I was talking about, this should work for you.

Crete
7 - Meteor

Dear ryan_lambert, 

 

thank you for your patience. I am really new and obviously did not get your first suggestion. 
I did try to play around but still have not resolved completely. Unfortunately I cannot open your workflow as I only have version 10.6. 
Could you perhaps make a screenshot?

thank you so much

 

best regards

Crete

SeanAdams
17 - Castor
17 - Castor

Hey @Crete

 

There's a great article here on how to adjust the file version of any file to suit your version of Alteryx. https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Adjusting-Alteryx-Files-for-Different-Versio...

 

In essence, you just open the file, and change the version number to 10.6.

 

many folk struggle with this, but this should allow you to play with @Inactive User 's flow as-is.

Crete
7 - Meteor

Dear SeanAdams, 

 

thank you for the advice. But it does not work for me. 

 

regards

Crete

MarqueeCrew
20 - Arcturus
20 - Arcturus

https://gallery.alteryx.com/#!app/Modify-Alteryx-Workflow-Version/5773f9c33df7da0e58dc82d3

 

The link above is for a version changer. 

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Crete
7 - Meteor

Dear Ryan,

 

finally I have a new Alteryx version and could read your sample.

Wow! This is clever! It worked perfectly. I have already integrated it into a complete working workflow.

 

 

 

Labels