Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Adding a column conditionally

carl-meyer
7 - Meteor

Okay so I have my workflow running intended for one sample of data but when i run it for another it doesnt work because it is short one column. Capture 2.PNG

So on the other sample F6 doesnt exist and the data i want to be in F6 is in F5. I tried dynamically renaming the columns and using a blank text input with a union to insert a column but if i do that then the first sample has 7 rows of data. Is there anyway to say if F6 doesn't exist add a column somehow? 

3 REPLIES 3
gabrielvilella
14 - Magnetar

Have you tried a text input with no records? Just the headers.

ArtApa
Alteryx
Alteryx

Hi @carl-meyer - Please find attached idea. You can play and switch off/on "w/o F6" and "With F6" containers. The pink "Empty" container will do the job for you. Please see attached.

 

ArtApa_0-1645587949844.png

 

 

logdog0411
9 - Comet

@ArtApa this just came in super handy making an iterative macro. Amazing how these tips can hve far-reaching impacts. 

Labels