Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Gallery App Output Not Writing Burst Files to UNC, Prompting for File Type / Download

KOBoyle
11 - Bolide

I have an Output tool configured to burst multiple, separate Excel files (not tabs) to a UNC folder (\\<server>\share\<path>\<burst file>.xlsx|||<tab name>). The workflow runs successfully in Designer and writes the output files directly to the UNC location. The Output tool configuration is based on this thread:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Output-to-separate-Excel-files/ta-p...

 

When I create an App, save to Gallery and run, I get a screen with a list of the files with an option to select the file type for each and download. I want the output to write the files directly to the specified UNC location with no output or action required by the user in Gallery.

 

Gallery Output:

Gallery Output.jpg

 

Designer Workflow:

Takes data from a single Excel file and writes to multiple, separate Excel files.

Designer Workflow.jpg

 

Gallery App:

Interface added to allow for Input file selection.

Requirement: configure Output tool, workflow dependencies so the Gallery app writes the files to the UNC location with no action required by the user.

Gallery App.jpg

 

Based on this thread

Solved: Re: Alteryx overwrite yxdb not working in Gallery - Alteryx Community

 

I took the following actions, but the behavior did not change.

1. Replaced %temp% with a full, default UNC folder in Write to File or Database 

2. In Designer workflow dependencies, selected Edit for the Output tool and set to 'Relative'

3. Saved workflow to Gallery, and re-ran.

 

Output Config.jpg

10 REPLIES 10
mbarone
16 - Nebula
16 - Nebula

If you pull up View, Interface Designer, you'll see the option to uncheck any output upon successful completion.  That should do it.

jrgo
14 - Magnetar

Hi @KOBoyle 

 

I recreated your workflow in an attempt to reproduce the results your seeing, but it seems to be working properly and I'm not getting the download file options in the workflow result page.

 

Question... 

  1. Regardless of what you're seeing in the result page, are the files being created in your network location or no?
  2. Is the "8.31.2" showing in the download file names a date reference dynamically created/concatenated in the Formula tool or something else? i.e., if the former and if you ran it right now, would it show "9.3.2"?
    1. this question is primarily to ensure that the files showing aren't from files created during development that got packaged with your workflow when you published to Gallery.
  3. Can you share the expression (text or screenshot) used in your formula tool to create the burst file name?
KOBoyle
11 - Bolide

@mbarone, that sounded so promising, but when I unchecked the option to 'Open Files From These Tools' for the Output tool there was no change in behavior.

 

@jrgo 

1. Per the title of the thread, No, the burst files are not being written to the UNC folder.
2. I removed the date portion from the filename in case the extra periods were causing a problem. The input filename is not relevant to the issue.
3. The burst filename is constructed as follows:
Substring([FileName],0,FindString([FileName], '.xlsx')) + '_' + [PM] + '.xlsx|||buy review file PM'
I include the FileName from the Input file, parse off the extension and append '_<PM>', where <PM> is the first name of the recipient. The burst files are written to the same UNC as the input file.

Example filenames are the following
\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\TEST_SOYALA.xlsx|||buy review file PM
\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\TEST_AUSTIN.xlsx|||buy review file PM

When running in Designer, the burst files are generated. When running with an app in Gallery, they are not.

Thanks for the replies/suggestions so far,
Ken
 

jrgo
14 - Magnetar

Hi @KOBoyle 

 

I think your issue is that the burst file name that you're creating is only including the file/sheet name, no path. And since you have the option in the output tool to "Change Entire File Path" selected, it's only being given the file name and clearing out the path so the files are being created in the workspace Gallery staged the workflow in.

 

I believe if you update your formula to the below, that should update the output tool to drop it in your network location.

'\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\'
+ Substring([FileName],0,FindString([FileName], '.xlsx')) + '_' + [PM] + '.xlsx|||buy review file PM'

 

KOBoyle
11 - Bolide

@jrgo as my examples showed, the full path is included.

 

Example filenames are the following
\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\TEST_SOYALA.xlsx|||buy review file PM
\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\TEST_AUSTIN.xlsx|||buy review file PM

jrgo
14 - Magnetar

@KOBoyle 

 

Can you share a copy of your workflow? no data needed, just the workflow itself so that take a closer look at your setup.

jrgo
14 - Magnetar

@KOBoyle 

 

Actually, I think I know the confusion. The "File Input" interface tool operates differently on Gallery vs. running locally in Designer. Unlike local where the workflow will read the file from the network location, in Gallery, the question is actually used to upload a copy of the file to the workspace. The workflow then reads the copy of that file that was uploaded, not the actual one on your network location.

 

That's why your file paths are showing with that "In_xxxxxx\" path. That's where Gallery staged the copy of the uploaded file for your workflow to use.

 

I think the expression below is what should get you going. The FileGetFileName() function just strips the file name from the full path and then use it to stitch it all back together as you were doing.

'\\ARI-ALTERYXPW01\Alteryx\DEPARTMENT\Planning\'
+ FileGetFileName([FileName])
+ '_'
+ [PM]
+ '.xlsx|||buy review file PM'

 

KOBoyle
11 - Bolide

@jrgo I saw that it was uploading the input file, but didn't realize the implications of that. Your formula to construct the burst filenames works. However, I would like to avoid hard-coding the UNC location. Is there a way to capture the actual UNC path of the input file from the File Browse tool and include it in the formula?

jrgo
14 - Magnetar

Capture from the File Browse tool, no. You could add a Text Box interface tool that can be used to enter in the directory path to use and then use that to stitch your desired output path. If you do make it a user option though, you'll likely need to add some checks to make sure they entered a UNC path and not a mapped letter path. You may also have issues if they enter a path that the server doesn't have access to.

 

For the first thing mentioned though, you can use an "Error Message" tool to validate the path entered by tripping if the path entered does not start with \\

!StartsWith([#1], '\\')

 

Not sure how I'd work around the second though.