Alteryx Designer Desktop Discussions

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

How can I create only 1 output file using derived name from a field?

Mikesz
5 - Atom

I am trying to name an output file using "Take File/Table Name From Field"  "Change File/Table Name" options on the configure screen. I have a formula that formats a field "[INPUT_Field_1]+"Support_TOTAL_test_"+[DateToday]" to create the file name I want using the value of the field . In the "Write to File or Database" I input the path and a file name but I want the file name from the data field.  When I run the workflow I get 2 files one with the correct name from the field and the other with the name from the field without the prefix and suffix appended. How can I stop this from happening? This is for a csv format.Annotation 2019-09-27 133718.png

5 REPLIES 5
Treyson
13 - Pulsar
13 - Pulsar

Hello @Mikesz,

 

I think that we need a little clarification on your question. Are you saying that you have a formula that is resulting in two values in the new field? And thus, it's trying to create two files based on the two names that are being returned?

 

In this field with the unexpected file name (missing pre/suffix) are there null values in the prefix/suffix field?

Treyson Marks
Senior Analytics Engineer
Mikesz
5 - Atom

I enter a file name/path in the write to file or database field.  But I create a field using a formula where I concatenate a value from another field, a fixed constant, and todays date.  [INPUT_Field_1]+"Support_TOTAL_test_"+[DateToday].  When I run the workflow I get 2 seperate files, "CASupport_TOTAL_test_092719" AND "Support_TOTAL_test_". Hope this makes sense, Thank you for input.

Treyson
13 - Pulsar
13 - Pulsar

do a test. Drop a sum tool and do a count of and group by on [INPUT_Field_1]. I would bet that you have the value "CASupport_" in most of them and NULL in the rest. 

Treyson Marks
Senior Analytics Engineer
Mikesz
5 - Atom

DUH! Yup that was it THNX!!  

Treyson
13 - Pulsar
13 - Pulsar

Excellent! Anytime that something involving a formula is returning more results than I would expect I always think about null values because they make weird things happen.

 

Could you do me a favor and mark this solved so future users with this problem can find the solution quicker?

Treyson Marks
Senior Analytics Engineer
Labels