Using Optional Macro Inputs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Error Message
- Input
- Interface Tools
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See my reply in that thread...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for passing the question along @joshuaburkhow ! The folks in that thread provided a few options for cleansing/normalizing the optional input fields.
