Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Field info filepath as input to macro adds extra path

GloriousWater
8 - Asteroid

When i use the Field Info to get the filepath and then summarizes it, so the ONLY input to the batch macro is the filepath of the input it gives an error. 

However, if i use the filepath from the input by "output file name as field = Full path" it works. My problem is that this is going to be turned into a macro, and i cannot be sure that the user will tick off the output file name as in their input. 


Error is.

e.g. Correct File path input to macro is C:\blabla\bla.csv  however when using the field info the error message says that the input attempted is c:\user\"Username"r\Andet\Alteryx Macros\C:\blabla\bla.csv   so it adds an extra "path" infront of the correct path.. any way to fix this?

Sicar_0-1589395036924.png

 

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @GloriousWater ,

 

Would you be able to share your workflow + macro for me to check it out, please?

 

It seems like something related to the regex function we developed, but I'm not sure yet.

 

Best,

Fernando Vizcaino

GloriousWater
8 - Asteroid

@fmvizcaino   So, 3 files. 

 

Test of macro is the workflow with an excel or csv file as input (not text input) as its using the filepath, so needs a physical location.

The "macro" in the test workflow is 2of2 that one is then inputting again in 1of2 (the batch macro). 

 

So the only purpose is that whoever wants to append LastWriteTime to data chooses their input file, connects to macro, and in macro add the line that data starts on in that file. (Default is 1 if they forget). 

 

The file should then read and through Field info in 2of2 input filepath into the batchmacro which should make it run. It doesnt.. 

 

If you however, delete the field info from macro 2of2, add an input tool, tick off output file name as full path, change summarize from (source, field info) to group by FileName and then change input back to macro. and run it in test again then it works (as longs as you also output FileName as full path in the test workflow input). Whole point is i want to avoid having people to have to remember outputting the full path by utilizing field info.

 

sorry if its a bit chunky explanation.. been at it a while now 😛 

 

Addet for clarity: Input -> Macro 2of2 that utilizes Batch Macro 1of2. 

 

//Simon

fmvizcaino
17 - Castor
17 - Castor

Hi @GloriousWater ,

 

I only need to insert one more formula right after the field info tool. The difference between output the file name using the input tool and the field info tool is that the second one outputs a different filename is preceded by the 'file: ' string

 

fmvizcaino_0-1589421689417.png

 

Best,

Fernando Vizcaino

 

GloriousWater
8 - Asteroid

@fmvizcaino  Thank you a million times 🙂 Its finished, its beautiful and its working.

 

It will be used by many i hope 🙂

Labels