Hi,
I have a path where one file is saved.
Using directory tool I pass the full path to Dynamic Input tool to read all the data from excel file.
It works perfectly fine if there is a file in folder.
But it won't work if folder is empty. It gave me an error.
I want to add a logic in such a way that if file is not exists in folder then Dynamic tool should not be run. Dynamic tool only run when file exist.
It would be great if you can assist me.
As I am stuck in between.
Attached email for your reference.
Please note I want to use directory tool only to pass the path. Also I don't want to stop the process if file not found using error tool.
Thank you in advance.
Solved! Go to Solution.
Can you provide how you have your Dynamic Input Tool configured?
Hi RolandSchubert,
Thank you for response,
I have seen the solution which you have provided but I don't want to stop or cancel the workflow.
It should be work true and false basis
If file exists then dynamic input should work if false the only process my false side further logic,
Thank you
Hi,
Thank you for response.
I have configured dynamic tool like
1. Select the option button - Read a list of Data Sources
2. Field Dropdown select the -> FullPath from directory (It works if file found other wise gives an error.)
3. Action -> Change Entire File Path
Thank you,
Waiting for your reply 🙂
I see. What about using a Count Records tool to count the number of files, append the count to all records and use a Filter tool to process Dynamic Input only, if count (=> number of files) is > 0.
Hi,
Thanks for reply. It doesn't work for me it is giving an error because even after count is zero it processed through this dynamic input tool and it gives me error saying file not found,
Once again thank you 🙂
Here is a slightly modified solution from the one @RolandSchubert provided. The problem with using the append tool is that it will only append if data exists. That means you are still getting the error on the Dynamic Input. I'm using a Blocking Test macro from CReW Macros to stop all downstream tools if no file exists. I've attached a workflow for you to try out. If you remove the file "My Data File" from the "Data" folder, the workflow should stop processing the downstream tools.
Hi,
Thank you for your help.
Need your help on CReW macro. How should I add CreW macro on Alteryx.
I am using Alteryx 2019.
You can find and download the CReW Macros package from this website: http://www.chaosreignswithin.com/p/macros.html
They have a bunch of other useful macros as well and great help tutorials!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |