Folder Browse to Change Output Path
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a workflow that outputs several different Excel files. Since most users will be using this as an app, but not in the gallery, I need a way to customize file/folder locations for output.
The File Browse tool works perfectly for output. However, since I have multiple files being output in this app, I would like the ability to have the user select one folder output location, and all of the output tools would then output their corresponding files to that folder location, rather than having to specify each individual output file.
I have tried multiple different methods with the Folder Browse tool, but cannot get it to work correctly. I have tried Update Value, Update Value (with Replace a Specific String selected for the folder path), and Update Value with Formula, and none of them seem to change the folder path from the default one pre-input in the workflow. Does anyone have any insight as to how I can get this to work correctly?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jcastles003 I've attached a simple example which hopefully helps. Pay particular attention to the way the action tool is setup. As an alternate (and my personally preferred method), you can use the %Question.ToolName% method. I've included both in the attached. Let me know if that doesn't help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for providing your example. When I test yours out, it works exactly as I want, but I still can't get my own to work. It's as if it just completely disregards my folder browse input and still tries to input into the same location provided in the output.
Is there something I am doing wrong? Does it not work if you're overwriting a tab within an Excel document? Every time I run the below workflow, it still writes it to the original save location, C:\Data\, not where I have selected on the Folder Browse. Note that it still causes an error even when I have C:\Data\ created, so it's not that it's unable to find the directory.
Here is what I have:
Output Data Tool:
Folder Browse:
Action Tool:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I got your other method to work, where I have a Folder Browse disconnected from the output, and then put in "%Question.Folder%\" as the destination folder in the output. However, this method ruins my ability to run the workflow as a workflow, not as an app, which I would still like to retain the ability to do. Thus, my goal method would be to do your first example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jcastles003 2 quick replies : 1) you will need to change your action tool by clicking on the file-value row. It's not at all obvious, but the row you select in the action tool is the only row that anything can be changed on. 2) the %Question.Folder% method just moves the default location to your workflow configuration window:
Whatever data you put in here will be passed when you run it as a workflow (and will be completely ignored when run as an app).
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much! I would never have figured that out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Patrick,
Sorry I couldn't understand your solution. I have the same query as @jcastles003.
Made changes as per the specimen workflow "Output to Folder" uploaded by you, but couldn't make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Where are you getting the error? For me, after I copied in @patrick_digan's initial solution, the problem for me was that I didn't click on the right row on the action tool variable or attribute to update (have to click on the file path row in the action tool). If you upload a sample of your workflow, I might be able to help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The key to using the %Question.ToolName% method is that the "ToolName" portion of it has to be exactly the same as name of the specific Folder Browse tool. I have updated your workflow so it works and attached it.
Previously, the name of your "Select output folder" Folder Browse tool was:
You input the "Write to File or Database" destination on the Output Data field using the %Question.ToolName% method, which is:
Thus, since the ToolName portion of that has to match the Browse Folder tool name exactly, if I change the Browse Folder tool name where indicated below, the workflow works as intended, outputting both files to the same location.
Alternatively, you could connect a second action tool to the Browse Folder tool, coming from the second Output Data tool.