Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Data flow to run while file is open

Mahabirpanigrahi
8 - Asteroid

HI All,

 

Need a suggestion on the my workflow to run while my file is open.

 

I have data in .xlsx format in multiple folder, i used dynamic input tool to get the data . One folder has multiple files, i need to pick only latest file from each folder. And i have running the flow in 30 mins loop to get the updated info.

Suppose folder A, I have wrongly kept open the "Latest .xlsx file". So as per process the flow will throw me an error, and the data from that folder A will not be picked thru Alteryx.

 

So, are there any way Alteryx will pick up the previous updated file ?

 

Enclosed here the data structure for your reference.

 

Is this something possible in Altreryx ?

 

Please help!

 

Mahabir.

 

11 REPLIES 11
ganesamurthy
8 - Asteroid

I believe there is no direct solution to this, but when you open an excel file it creates a hidden '~$<filename>.xlsx' file as long as it is open and you shall use your logic to check if this file is there to select next latest one.

 

If you are using directory tool then 'AttributeHidden' field will set to True for this file.

T_Willins
14 - Magnetar
14 - Magnetar

Hi @Mahabirpanigrahi,

 

There is a solution, but I would give caution that having the workflow error may be better if you always want the latest information.  The CReW macro Conditional Runner can be used to solve this issue as per the attached workflow.  Conditional Runner runs a copy of the workflow attached (the one shared in your other post) and looks for errors.  A filter tool removes the files with errors, then applies the same logic to find the most recent file.

 

conditional runner config.JPG

 

select latest file with error check.JPG

 

Mahabirpanigrahi
8 - Asteroid

@T_Willins Agree to your suggestion that, error should be good as it will help us load the correct file.

But point is, if that file wont load it wont be there in the output file, so will cause a problem. hence looking for some solution. And really appreciate for taking time and helping me for this. Really appreciate that. Thanks a lot.

 

 

Regards

Mahabir.

Mahabirpanigrahi
8 - Asteroid

@T_Willins  - can you please help where to download the "CReW macro Conditional Runner", i dont find it in Alteryx gallery .

Mahabirpanigrahi
8 - Asteroid

Will check it. Thank you @ganesamurthy 

ganesamurthy
8 - Asteroid

One question though, what if the error in the workflow is due to something else, this wouldn't be suitable, right?

 

I believe checking for that temporary hidden file would be more suitable for this case rather than running this Crew Macro (unless it has specific option to check the nature of error).

 

Your thoughts?

T_Willins
14 - Magnetar
14 - Magnetar

You can download it directly from the CReW (Chaos Reigns Within) website:

 

http://www.chaosreignswithin.com/p/macros.html

 

The website also has great Alteryx information on it and if you are going to be at #Inspire, try to go to the classes by Alteryx Ace and Marquee Crew founder @MarqueeCrew as they are well worth it.  

T_Willins
14 - Magnetar
14 - Magnetar

Hi @ganesamurthy,

 

You are correct, which is why i don't like to build solutions to work around workflow errors like this.  It's better to solve root issues (file being opened) than to create a work around.  In this specific case if the error in the workflow was due to something other than a file being opened the second workflow (with the CReW macro) would still error alerting the user to the need for further analysis of the issue.

Mahabirpanigrahi
8 - Asteroid

@T_Willins Got the error, am i doing anything wrong ?

alteryx2.JPG

Labels
Top Solution Authors