Hello,
I have setup a workflow where I want the Action tool to allow the user to run the Analytic App and select the save location for the output.
In 'Select an action type' I have selected 'Update Value with Formula', selected the output location, and entered the formula as:
Replace([Destination], "C:\Users\XXXXXXXXXXXXX", [#1])
However, when running the app, it still saves the output in the original folder location, even though I select a different location? I even tried 'Update Value (Default)' and ticked the box to 'Replace a specific string' and entered the above folder path in quotes, but it made no difference.
I have used the 'Update Value with Formula' method before and it works, the only difference is before the outputs were rendered .xlsx files, and this times its a .txt file, but surely that shouldn't make a difference?
@HarriDhillon wrote:
I even tried 'Update Value (Default)' and ticked the box to 'Replace a specific string' and entered the above folder path in quotes, but it made no difference.
Hey @HarriDhillon - try this part again but without quotes. In the 'Replace a specific string' configuration you only want the actual text that you're replacing, no need to quote it as if it's part of a formula. Mine would look like this for example:
Hi @DataNath
I just tried that, and although it doesn't save to my original folder location, it doesn't save it in the new specified location either.
Ah I see the issue now @HarriDhillon - you're replacing everything including the filename. As you're using the folder browse, you only want to replace up to the final directory i.e. 'Output' in the example you just attached. That way, only the folder structure will be changed in the filepath when you run the app - have amended and attached the flow above:
Funnily enough that works on the Test workflow, but not on my real one. I'm doing the same thing, I'm only replacing everything up to the file name and it still doesn't work.
My full path is C:\Users\XXX\XX\File Name.txt
Therefore my formula uses "C:\Users\XXX\XX\XXX"
@HarriDhillon if the full path is My full path is C:\Users\XXX\XX\File Name.txt
Then you should replace C:\Users\XXX\XX, rather than C:\Users\XXX\XX\XXX
I did a bit of experimenting, and it looks like the problem lies within the Output Data tool.
I am selecting the 'Take File/Table Name From Field' option, and selecting 'Change Entire File Path', and it still saves to my original folder location (after I've updated the formula as mentioned above).
However, when I select any of the other options (Append..., Prepend..., Change File...) then it DOES save the output to a new specified location. Not sure why this would make a difference? This only solves half the problem, as although I can now save the output where I want, I need to use the 'Change Entire File Path' option in order to preserve a dynamic naming convention.
@HarriDhillon are you able to share the workflow? Or at least the Formula expression and the Action tool setup of how you're changing this?