Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Save to a user designated output

Highlighted
5 - Atom

This is my first attempt at building an Alteryx workflow, so I'm sure I'm missing something simple, but I am trying to set the workflow to output to the folder designated by the user at the beginning of the workflow. I tried using a wildcard in the output file and I couldn't get it to work. There are four separate outputs that are all saving a separate tab to the same file. I am away from my computer at the moment, but when I get back I can post some screenshots.

Highlighted
17 - Castor
17 - Castor

Hi @Bwink88 

 

The macro you posted requires some custom macros, XLSX_SheetReader.yxmc and XLSX_FolderImport.yxmc as well as a couple of excel files to function.  Without these missing components, it will be very difficult help you with the problem you're having.  If you go to Options->Export Workflow, Alteryx will create a package that includes all theses dependencies.  You can then attach the package.  If the input excel files contain sensitive data, please create a sanitized sample version before including it in the package.

 

Dan

Highlighted
5 - Atom

Thanks for letting me know about setting up the package, I have set up the package with a couple of mock Excel versions of the original files.

Highlighted
17 - Castor
17 - Castor

hi @Bwink88 

 

The .xlsx file didn't get bundled in the package, but I think I have enough to fix the issues. 

 

The first issue was that the Directory tool returns a directory path without any file name, so you can't use this to directly modify the path in the Output tool.  The second was that the Action tool wasn't configured to modify the correct value.

 

BadAction.png

 

The Action tool tried to update the line that is highlighted in the Value/Attributes window.  In your workflow, you had the OutputData(3) attribute highlighted.  You'd want File - Value instead if you had a complete path.

 

Here are the changes I made to get PowerTax Summary.xlsx written to the user specified directory.

w.png

Fairly straightforward.  The only tricky parts are the New Action tool set to update the Output Path expression

UpdateValue.png

 

And the changes to the Output tool

Output.png

 

You'll have to perform steps 3,4 and 5 for each of your output tools.  

 

Dan

Highlighted
5 - Atom

Hi @danilang,

 

I was able to use your guidance to fix the issue, thank you so much! I had spent all Friday and early Saturday morning trying to figure it out. I did make several small tweaks:

 

1) I tried setting the Action as you had mentioned, but I kept getting parse error when it got to the Formula. I did the following:

     a) In the Action configuration, I checked the box to Replace a specific string: and then took the quotations off from around C:/Test

    Action.png

     b) I then added a \ after C:\Test in the Formula configuration. Since the action replaced C:\Test, it left the slash in so the output would save to the destination folder, otherwise when the process ran, it would save it to the parent folder under the name of the destination folder.

Formula.png

 

I have attached the final workflow. I am getting the following strange message:

     Error.png

Output 38 is set up exactly the same as the other outputs, with the exception being that it has it's own unique name of DepSchedule. When I open the output file though, it appears exactly as I would expect; it's like the workflow is trying to save the tab twice. Do you know why it would be doing this?

 

Highlighted
Alteryx
Alteryx

Hi @Bwink88,

 

The reason why you are getting the error is because you already execute the workflow successfully, the outputs were generated and now you are trying to run again the workflow but the outputs are there.

 

You have your outputs configured as 3. Output options: Create New Sheet

 

VianneyM_0-1577639596379.png

 

I recommend you change them to:Overwrite Sheet (Drop)

 

VianneyM_2-1577639664709.png

 

let me know if this works

 

Best,

Vianney

 

Best,
Vianney
Labels