Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Batch macro Error help

AC
7 - Meteor

hey Guys, 

 

would you please help me to resolve this error. I have to create a batch macro that should read all file name in directory and extract their column names with directory. I have create batch macro for it ( see attached snaphot 1 for batch macro) . Here I input all fields of directory and than on interface tool I have given  update value for all values inside formula (see snapshot 2) .  It works fine inside macro. but through error on main workflow.. I have attached workflow sample below.

 Batch Macro:

AC_0-1686935307559.png

 

On workflow , when I connect FilePath to the Macro it gives an error saying "Record #1: Tool#14 Parse Error at char(0):Unknown Variable:....". Tool 14 in macor is fomrula. Not sure why it is causing it. 

 

AC_4-1686935975534.png

AC_7-1686936073363.png

 

 

 

AC_5-1686935995916.png

AC_6-1686936011151.png

 

12 REPLIES 12
acarter881
12 - Quasar

Hello, @AC

 

The workflow you attached doesn't include the macros. To include them (if you want), you can export the workflow as a yxzp by clicking Options -> Export Workflow.

 

Also, the Control Parameter is setup to replace the entire string of [FullPath] + "|||Sheet1". Do you mean to only replace FullPath?

geraldo
13 - Pulsar

@AC 

 


your action tool does not have the replace option at the bottom left marked for which value you want to replace

AC
7 - Meteor

@acarter881  Thankyou for the reply. I have attached macro below. 

For Control Parametetr I have setup to entire string. I tried with replacing path but endup on same error.  

AC
7 - Meteor

@geraldo : Thankyou for the reply. 

 

 I have tried with replacing filepath but endup on same error therefore I chnaged it to whole string to be replaced

geraldo
13 - Pulsar

@AC 

you have to select this option and choose what you want to replace

geraldo_0-1686938261912.png

 

 

 

AC
7 - Meteor

@geraldo  I have given  tried with replace specfic string but endup on same error. 

 

acarter881
12 - Quasar

Hello, @AC.

 

I believe you're adding an extra "|||Sheet1". It is not necessary to group by FullPath, as there will not be more than one FullPath that is the same from the Directory tool.

 

I ran the yxmd and do not receive an error. I changed the FullPath in the macro to a string and it's set to replace the text MyData (not including the quotation marks).

 

Please let me know if this helps.

 

 

acarter881_2-1686938540220.png

 

 

acarter881_3-1686938550829.png

 

 

 

geraldo
13 - Pulsar

@AC 

you have to be like this


and just leave what you want to replace

 

geraldo_0-1686938772789.png

 

AC
7 - Meteor

@acarter881  can you please share workflow and macro. It would be helpful. Thankyou 

Labels