Alteryx Designer Desktop Discussions

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

Macro issue to input xml files with different schema

daophuongtrinh
8 - Asteroid

Hello everyone,

 

I intend to build a macro to loop the full path of xml files and then input it into workflow. But the macro only returns one file only, I was unable to find the problem with this macro.

 

Here I have 4 xml files with different schema, I use Directory to get the paths, and make macro to loop those paths.

 

This is the output of Directory:

daophuongtrinh_0-1603426172080.png

 

This is the output of Macro:

daophuongtrinh_1-1603426233276.png

 

I expect to have 4 records out from Macro, but I was unable to find the issue. Please have a look at this in the attachment and share your idea with me 🙂

 

Thank you in advance.

Best,

Trinh

 

 

9 REPLIES 9
grazitti_sapna
17 - Castor

Hi @daophuongtrinh , I have made some changes in your macro give this a try.

 

grazitti_sapna_0-1603427184789.png

Configuration

grazitti_sapna_0-1603427760231.png

 

grazitti_sapna_2-1603427255380.png

 

Attaching the macro along just you need to change the path in the macro where I have mentioned

Result-

grazitti_sapna_3-1603427310196.png

 

Attaching a workflow along.

 

Thanks.

 

 

Sapna Gupta
daophuongtrinh
8 - Asteroid

Dear @grazitti_sapna 

 

Thank you very much for your solution, however when I change the path the result still returns 1 file only. Could you confirm that I have changed these paths right?

 

I have changed:

1. The path in Text input

daophuongtrinh_0-1603428826685.png

 

2. The path in Dynamic input:

daophuongtrinh_1-1603428885337.png

 

Here is my result:

daophuongtrinh_2-1603428953011.png

 

grazitti_sapna
17 - Castor

@daophuongtrinh  try saving the macro and insert in the workflow again. 

This is my result.

 

grazitti_sapna_0-1603429258411.png

 

Let me send you the file again with modification in the name maybe the macro is still your older macro in the workflow.

 

Try this and follow the same procedure as told earlier.

Thanks.

Sapna Gupta
daophuongtrinh
8 - Asteroid

I have tried several times but it still returns the same 1 result 😞

 

daophuongtrinh_0-1603433456280.png

Could you please have a look at my workflow as well?

grazitti_sapna
17 - Castor

Hi @daophuongtrinh , can you create a yxzp file and then send it? I am not able to access the macro also I do not have access to your directory so I can test on my path only.

Thanks.

Sapna Gupta
daophuongtrinh
8 - Asteroid

Dear @grazitti_sapna, please find the package and macro in the attachment.

 

Thank you very much!

grazitti_sapna
17 - Castor

HI @daophuongtrinh , try passing the location of a file in text input and dynamic input tool as shown in the image below.

 

grazitti_sapna_1-1603443969388.png

grazitti_sapna_2-1603443979873.png

 

grazitti_sapna_3-1603444086949.png

 

attaching the macro and workflow below.

 

Thanks.

 

 

Sapna Gupta
daophuongtrinh
8 - Asteroid

Dear @grazitti_sapna ,

 

I just delete and enter, unclick and click and save and close and open, and now it works with just the original solution :))

I can't tell why but thank you very muchhhhh!!!

grazitti_sapna
17 - Castor

@daophuongtrinh , I am glad it finally worked for you. Have a great weekend ahead.

 

Thanks.

Sapna Gupta
Labels