This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I got around to fixing 2.0 version which had absolute path issues that required linking macros back up. Thanks Wayne at Alteryx for testing.
I create a lot of workflows (800 and counting) and often need to find workflows that created a specific yxdb or csv file. Or I need to find all workflows that use a specific tool - like the Download Tool(eg xml = download.download), so I can remember how I set it up for a API so I can use in another service.
Crawl all my directories with yxmd/mc files and then search the filename and file xml for keywords.
This workflow takes the path(s) you specify and creates a list(via .bat file - eg windows only) of all your yxmd/mc Files/Paths and then runs through a batch macro to look for the keyword you are searching and returns the file name and path so you can copy and open to get on with your business.
There are 3 inputs:
The Path(s) you want to search for all of your yxmd/mc files to create the list. CAUTION: Don't start to shallow like "C:" as this will take a long time to search EVERY directory on your computer - even more of an issue for network drives.
The temp path to save your list of yxm* files absolute paths. This must be a directory associated with the user (eg docs/download and not a system path)
The Search Term - NOTE: this uses the contain function so it is broad match. Best to start wide and narrow down as you become familiar with the results.
Once enter your information: RUN to see your results by
Keyword in File Name (excluding path)
Keyword in Files broken out by yxmd or yxmc with counts of occurrences for keyword in the file. (side note: I discover my text 'inputs' stored in workflows makes the files large. Just search for <r> and you will see some very large counts if you manage to store data in your workflows.)
Some notes on searching for a tool in a workflow.
Start with the tool name but if the results are large and finding stuff you don't want or did not expect look up in xml to see real alteryx name
a good example is the download tool - if I search for "download" I get 279 results, but if I search for "download.download" there are only 136 results
If I search for "download" - it pickups a path with folder download
To look up in xml, either just open your yxmd file in a text editor and try to find what it is, or create a temp workflow with that tool and look at xml in configuration for the workflow (I think you must turn on xml in users settings for it to show up in conf section)
Hopefully you find this useful as it was a pita to setup with relative paths and export into a file for others to use ;)
I added a bat file output to diagnose issues and if you want to see what is creating the list of files.
If you run into issues, you can run each line in a CMD to see which line is causing errors.
Random notes on creating this package workbook.
I had all kind of issues getting this to work for various reasons.
The mapped drive had odd issues and required some of the flags you see in that bat file, I don't even remember what they were but you can look up if really interested.
package workbooks with nested macros and paths to files are way messy to make sure they work on someone else machine.
I ended up having to put the 2 macros and CSV into a temp folder and work from there. My local macro folder was causing all kinds of confusion for me and the export.
Once in the temp folder I opened each one and set the relative paths to that folder for all files/references. eg options>advanced options>workflow dependencies
Once the references where setup with the .\ relative paths format, I had to clean up references in the macros to paths/files and also update my control parameters to 'update' the correct part of the path. This took several iterations and was probably the most complicated.
I had hard coded the temp file name into the macro and that was confusing matters so I moved out of macro and add file in the main workflow after the users sets their path. This full temp file path is now passed to the macro.
I came across another use case today - finding a workflow that outputs a specific column name.
I had created a flat file with summarize tool that had the header: "CountDistinct_Right_OrderID" and I could not remember when or where I created this file. Luckily it was a unique enough name that I could search for the header name - which never really occurred to me since usually they are rarely this unique.
I searched with FINDER for "CountDistinct_Right_OrderID" and it found the ONE file that had created.
Replaced the Question mark with the Select Records tool and now, I am getting an output.
The output file has the file path of all alteryx workflows in a folder. Thats really great.
However, just a step further, Can i request a workflow to look withing a single file and list out the input files for that workflow/ all workflows within the folder and then the output files for the same?
To go further, I would ideally request a workflow that indexes
1. Filename with filepath of the alteryx workflow./app (single and within a folder)
2. Output filename and filepath of that workflow/app (single or within a folder)
My organisation has over 700 workflows and I constantly get requests to look within a workflow and edit it to update the output file. I have a hard time backtracking an output file to its workflow and such.
I can't get it to work, sorry. When I open to do the "fix" below, it doesn't look the same ?
My error is :
Individual Tool Counter (55) String fields are limited to 16384 bytes. Use a V_String field instead. Filter (41) 1 records were True and 2 were False Append Fields (39) 1 target records generated 1 output records Individual Tool Counter (55) Record #1: Tool #130: Cannot find macro "Debug\_externals\1\SelectRecords.yxmc". Individual Tool Counter (55) Record #1: Tool #129: The Source must have a valid connection Individual Tool Counter (55) 1 iterations were run Individual Tool Counter (55) RecordInfo::CreateRecord: A record was created with no fields.