Alteryx Designer Desktop Discussions

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

Using Dynamic Input tool in Server

clramsey
5 - Atom

I have been using Designer for a couple of years now, and I'm now implementing Server.  When moving all my workflows over, I need to update my file paths for inputs and outputs to the full path locations.  I'm having a problem with this workflow -- I have an Dynamic input and when I change it to the full path location, the import sheet names tool isn't working.  It is returning a temp folder in my C drive no matter what option I choose (full path, directory, file name, etc)  What am I doing wrong?  I'm attaching my workflow before server changes and after.

 

 

9 REPLIES 9
apathetichell
19 - Altair

Use a batch macro - don't use dynamic input.

clramsey
5 - Atom

can you expand on that?  I've never used a batch macro.

 

apathetichell
19 - Altair

There are many many many resources on this forum that discuss how to use a batch macro for dynamic processing of files. Basically dynamic input despite the name is very limited in that it requires:

1) a Template file.

2) schematic consistency between all sheets.

 

A batch macro replaces a file (non-template) with a path created at run time. Using an outer/inner approach this allows for dynamically selecting all sheets of an unknown excel file with an unknown schema which may not be consistent sheet to sheet.

KGT
12 - Quasar

No need to worry about switching to a batch macro because your workflow already uses a couple of batch macros rather than a Dynamic Input. The advice above is standard, and many of us on the forum will be willing to give it quickly when dealing with a Dynamic Input question as it covers 95% of Dynamic Input questions.

 

When you package the workflow, all the references change in order for the package to work. Ordinarily, packaging the workflow as you have done is the best way to get help here! In this situation, it removes what is most likely the issue, references.

 

What I think has happened here, is the "Import Sheet Names" batch macro is set up to replace a part of the filename in the input tool, and so when you switch to FullPath, the filename may look like this inside the macro: ..\folderoverhere\N:\Folder\FullPathLocation\thefinalfile.xlsx which will of course not work.

 

If you are just setting up server, then work out a macro repository and put a copy of this macro that uses FullPath. Then link that in the workflow, so that you have a centralised copy that you can use and know how it works.

 

I haven't tested the attached but should be fine. Of course, test it and understand it. Basically, the action tool will replace part of the Input path.

 

 

apathetichell
19 - Altair

@KGTthanks for clarifying and looking into it --- I didn't open the .yxzp and just saw the description as a dynamic input issue.

clramsey
5 - Atom

thanks very much for the info.  Can you reattach the document?  I'm having trouble downloading.

KGT
12 - Quasar

It looks like the upload is still uploading... Here it is again

clramsey
5 - Atom

Thanks -- this works great but in the past I would be able to use this for different workflows.  Since I need to show the whole path in the input data, will I need a separate macro for each workflow? See attached screenshot.

KGT
12 - Quasar

The action tool updates the Input Data with whatever is coming through on the Control Parameter. What I changed in the macro, is it now changing the entire filepath, rather than just a part of it. So that whatever [FullPath] you pass to it should work.

 

You should be able to use it for any workflows. It will replace everything in the input tool before "|||<List of Sheet Names>"

 

AlteryxGui_CJAY4zu8pO.png
Labels
Top Solution Authors