Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Using Optional Macro Inputs

pjungels
6 - Meteoroid

Greetings!

 

I am trying to use optional inputs in a macro. I understand from this post (https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Optional-Fields-in-a-Macro-Field-Ma...) that it should be as simple as adding "(Optional)" in the headers of the Macro Input tool's field map. I was able to do this and the macro runs without errors.

 

However, when try to I use the macro in a standard workflow, I get an error message. The error is Tool #15: Parse Error at char(11): Unknown variable "FieldName (Optional)" (Expression #1)  (FYI - tool 15 is a Formula tool with the following expression: IF IsNull([FieldName (Optional)]) THEN "Hello World" ELSE [FieldName (Optional)] ENDIF).

 

Do I need to do some sort of cleansing on those optional input fields in order to use them in other tools within the macro?

 

If you want an example, I took the sample macro from the post linked above and tweaked it so it uses the optional input field in the Formula tool and have attached it to this post.

 

Thanks for the help!

2 REPLIES 2
joshuaburkhow
ACE Emeritus
ACE Emeritus

See my reply in that thread...

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Optional-Fields-in-a-Macro-Field-Ma...

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
pjungels
6 - Meteoroid

Thanks for passing the question along @joshuaburkhow ! The folks in that thread provided a few options for cleansing/normalizing the optional input fields. 


Labels