Alteryx Designer Desktop Discussions

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

One Parameter for using in all the Formula Tool?

madhurinani
8 - Asteroid

Hello,

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.

 

 

How can I achieve that?

 

Thanks!

 

 

17 REPLIES 17
madhurinani
8 - Asteroid

@DataNath: I removed the File Browse tool and yet it does not work.
attaching the workflow.

I would say, run the workflow and choose your destination folder as required. 

The file path in formula tool is not your local machine address and should work for my use case.

DataNath
17 - Castor

@madhurinani I just tried it and it didn't work. When looking at the setup, this is because in you current setup, you're looking for 'C:\Users\minani001\Desktop\Bayview Legacy run\BV legacy input\Output' as the replacement target within your action tool:

 

DataNath_0-1666088022226.png

 

However, in your Formula expression you actually have 'C:\Users\abc\Desktop\Legacy run\BV legacy input\Output' and because they're different, Alteryx doesn't its target to replace and just leaves it as is. Therefore, you need to update your replacement target to the exact filepath that you're building out the workflow with, even if it's a dummy.

 

DataNath_1-1666088113790.png

 

If I do that and open a debug workflow, the replacement works as desired:

 

DataNath_2-1666088239886.pngDataNath_3-1666088251389.png

madhurinani
8 - Asteroid

Hello @DataNath :

To you comment:

"Therefore, you need to update your replacement target to the exact filepath that you're building out the workflow with, even if it's a dummy"

The file path cant be a dummy file path if you are using the exact file path, right?

Or maybe I am misinterpreting it .

 

Would you please be able to share the workflow that you edited on the debug part and I can run it on my machine and check if its working or not as expected?

That would really help me figure out what am I doing wrong.

 

Thanks

 

DataNath
17 - Castor

@madhurinani whatever you put into your Formula expression that builds the filepath essentially just acts as a placeholder, as it'll always be replaced by the user's selection, and therefore it can be whatever you want it to be (hence why I said dummy, as it just doesn't matter). I've attached the amended app with the Action tool reconfigured. Can you check if it works now? Cheers

madhurinani
8 - Asteroid

@DataNath : Its not working.

 

WHen I open the workflow. I see the below error. which basically says that they cant access the folder path 

madhurinani_1-1666357150934.png

 

madhurinani_0-1666357097852.png

 

Now when I run using the analytics app.

I get the below error

madhurinani_2-1666357220705.png

 

 

Thanks.

 

 

DataNath
17 - Castor

@madhurinani I think the issue may actually be caused by using a relative filepath in the 'Output Data' tool which we used to try and get rid of the previous error message (that's not actually an error at the time of running the app). If you make this absolute and then try running the app, does that help? I've just tried it and seemed to work for me.

madhurinani
8 - Asteroid

@DataNath : So when I make it absolute and run the report, it works fine for me as the absolute path is on my machine.
But when someone else runs the report, it shows error for Output data

DataNath
17 - Castor

@madhurinani if you reduce the filepath sitting in the Output Data tool down to something like this, does that work now?

 

.\Legacy.xlsx|||Original

 

DataNath_0-1666362227839.png

 

Was having the same issue as you but this seems to solve it as the one in there currently is relative, but relative to the rest of the path you had afterwards which other users may not have.

Labels