Currently I have multiple formula tool used through different data sources in my workflow
But that formula tool has the same logic used applied.
It basically has the location to store the file.
The logic used in the formula: "C:\Users\abc\Desktop\folder\folder2\Output\"+[Group]+".xlsx|check"
I would expect "C:\Users\abc\Desktop\folder\folder2\Output\" part of the formula to be added dynamically by the user. The rest is constant.
I want to make the location of the file dynamic as when the user runs using the Analytics app. They should be able to enter the location of the file and then that text should be used in the formula tool.
Hey @madhurinani, as part of a macro I built a little while ago, I did exactly this. Whilst your use case is an application, the approach will be exactly the same - the File Browse tool updating a directory within a formula tool.
File Browse tool which prompts the user for their save location:
The starting/dummy filepath I used to first build the macro (the other one is the same):
The action tool is set to only replace the directory part of the formula expression:
Like in my macro, you can use a single interface tool and have it impact on multiple tools (in this case, formula tools) by connecting a separate action tool to each. I've attached my file for you to look at and reverse engineer - hope it helps.
@madhurinani from the looks of it, you're replacing the entire formula expression. As you are using the File Browse tool to change the target directory, you only want the filepath part of the formula expression to be replaced and so you'll need to reduce the replacement argument down to that. Something like the following:
Apologies @madhurinani I should've noticed this the other day, but I've just had another look at your app.
At point (A) of the workflow, you're asking the end user to select a folder to save the workflow to which is creating a custom filepath that then feeds into your Output Data tool. At point (B) in the workflow you're then asking them again to define a location and file name etc, even though you've already created this in the Formula tool before hand. Therefore, you only need one of these - either the Formula tool which overwrites the entire filepath, or the File Browse that acts upon the Output Data tool directly. If I run the workflow in debug mode and select a directory, you can see that this is replaced correctly in the Formula expression and so should work as the output tool is configured correctly:
If you're still having issues, can you perhaps upload the actual app you're having problems with if it's not the same one that I have?