Free Trial

Alteryx Designer Desktop Discussions

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

Macro not recognizing calculations

HRGuy1223
6 - Meteoroid

HI All, I have a macro that when I add calc fields to calc %, it doesnt recognize the field. however, when i remove the calc fields, the macro works perfectly, Here is the error..

 

ErrorLink: OC Macro (22): https://knowledge.alteryx.com/index/s/article/Parse-Error-at-char-n-Unknown-variable-variable-name-E...Record #11: Tool #117: Parse Error at char(17): Unknown variable "Retail Branch Banking" (Expression #20)

 

before the formula tool, I defined the names of all fields in a select tool...  that works perfectly without the formulas... but each formula is erroring at the "defined" name of the field that was done in the select tool...

 

any ideas on why this is happening

5 REPLIES 5
OTrieger
13 - Pulsar

@HRGuy1223 

 

What Alteryx says that Retail Branch Banking field is not exist  when you run the data out of the macro.

From where this variable coming from? From the original data or is this a field that you are creating based on existing data?

HRGuy1223
6 - Meteoroid

Hi,

 

Thank you for the response... the "Retail Branch Banking" field was grouped in a summarize tool then separated in a Cross Tab tool... I am creating a % field based on current data and totals from the original dataset

CoG
14 - Magnetar

If you are "Defining", field names in a Select Tool, that will only work if that field is being passed as an input to the Select Tool. I would look back further into the workflow/outside the macro to ensure that all necessary fields are being carried along. The Select Tool doesn't care if a field it expected was missing, but other tools (like the Formula Tool, when referencing a field) certainly do. Screenshots, sample workflows, etc. would be helpful in providing more assistance to identify the problem.

 

Hope this helps and Happy Solving!

apathetichell
19 - Altair

Are you sure that your field is called Retali Branch Banking after your cross tab -> not Retail_Branch_Banking? If you are using summarize tool you need specific fieldnames. You can use a text input - with a field header -> union to mandate a field is included downstream - but most likely cause is that your fieldname changed after crosstab.

HRGuy1223
6 - Meteoroid

Thanks for that.... I have put a cleansing tool after the cross tab tool then a select tool to ensure the naming conventions... im still getting the same error as before.. i would send screenshots but I work in HR and the data is confidential... also, the macro is NOT running on Department name... its running on manager name   but the error is coming from department and all of the calc fields are showing no errors in the formula tool

 

Labels
Top Solution Authors