Alteryx Designer Desktop Discussions

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

Full Path details output in macro but missing on inserting macro in workflow

Shaina1
8 - Asteroid

Hi,

 

I'm using the output filename as filepath in my macro. Using this output-I'm using the text to column field to extract certain details like filenames and broad categories-based on filepath. On running the macro-i'm getting these details-but when I insert it in my workflow and call it in by the interface question-Filepath itself-neither the filepath details are coming up nor any of the fields I derived from it in my macro. For my filepath in my macro-I have selected the File-Value=(current filepath) in the action tool. Based on what I read on the community-for the extracted fields as well -I hardcoded the current values in a formula tool and then  connected them to action tools as well-in-order to a) show these fields in my workflow and b) update their values. The purpose of my workflow is to read in multiple excel files-so I want to filepaths and the extracted fields to change, but that's not happening. I tried degugging my macro-the hardcoded fields come as blanks there. I'm a newbie, so may have been missing something basic here. Attaching screenshots for reference. In my workflow-my interface question is the same filepath-I want to display the file path as well as extracted fields and make them change dynamically as different excel inputs come in from my directory tool. Currently I'm getting a parse error: Unknown Variable "H"-which is the starting letter of my filepath.

4 REPLIES 4
grazitti_sapna
17 - Castor

Hi @Shaina1 is it possible for you to attach your workflow with some sample data or if you could specify what is your desired output in an excel would be helpful.

 

Edited: As far as I am able to understand your query I have a question for you:


1. If you are already passing a path and then you are extracting the fields broad and filename then why are you creating separate action for the two fields. You can simply pass the file path in the macro and it will give you the extracted fields automatically?

 

Here is a screenshot of what I tried. I simply passed a path and extracted folder and filename using macro.

grazitti_sapna_0-1652419205203.png

 

If you can share your workflow and the desired output maybe I can help you out by making few tweaks.

 

 

Thanks!

Sapna Gupta
Shaina1
8 - Asteroid

Yes, it doesn't make sense actually. The issue is that my filepath-which I'm getting as a field in my macro is not showing up and neither are the fields that i have extracted. I'm pulling in my macro in my workflow through the filepath field itself-but this field doesnt reflect in my workflow. Unfortunately, I really can't share the worflow. I'm attaching a few dummy excels-What I have achieved is stacking them one on top of other-in my macro-I am getting the filepath details and subsequently using text to column getting the other details-but when I input into my workflow-I'm getting all fields except filepath and those extracted from it. What I want in my final output is the filepath and broad category and filename fields to show up on running the workflow and get changed dynamically-when different excel files are run.

Shaina1
8 - Asteroid

Actually-what I think might be happening is that my action tool configuration in my macro is to update value and replace string aka my filepath-and the input to this macro from my workflow are the actual file paths that need to be run. Maybe it's just running based on the filepaths-the file path field in itself is not getting attached to my excels as applicable and nor are my calculations done on it. Do I need to give a different action tool configuration -don't think it would be the case though or maybe create another macro to attach the file path details ?

grazitti_sapna
17 - Castor

@Shaina1  What you are saying is when you run the macro workflow it shows the file path and other required fields but it doesn't show up when you run macro outside the macro workflow? Am I understanding it correctly? If you are using a select tool did you try checking that inside the macro if it is returning that field? Also, did you use a macro output tool for your macro's output? Please refer to the screenshot below.

It is quite hard to understand or provide a solution unless we see what is actually going on inside the workflow. I hope this helps!

 

Edited: This is what is happening in my macro.

 

Action Tool Config

grazitti_sapna_0-1652433803558.png

 

Input tool Config

grazitti_sapna_1-1652433835286.png

 

Outside Macro

Directory tool config- where I am actually reading my files from a path

grazitti_sapna_2-1652433874446.png

 

Selecting a question

grazitti_sapna_3-1652433891562.png

 

 

Thanks!

Sapna Gupta
Labels