Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Optional Inputs for Standard Macro

memphis_data
5 - Atom

I'm new to Alteryx, and I am trying to make it so that there are several optional inputs to a standard macro, and based on which input used to then pull the data known by the user of the macro.  Here is a simple example of what I'm trying to accomplish.

 

memphis_data_0-1606712736834.png

The problem is that I get an error when I try to use it.

 

memphis_data_1-1606712923919.png

 

I assume what I'm doing is not allowed, but I'm not sure what other option I have than to make several macros for each input option may be known by the user of the macro.

 

Any advice?

 

 

3 REPLIES 3
Qiu
20 - Arcturus
20 - Arcturus
atcodedog05
22 - Nova
22 - Nova

Hi @memphis_data 

 

Here is an explanation with an example. I am creating a simple tax calculator macro

 

Macro:

atcodedog05_0-1606715175968.png

Even though Tax is optional, if tax is going to be used in a calculation a default value should be set or it will turn to null. I am setting default value as 30 by replacing null with 30.

atcodedog05_1-1606715254190.png

 

Workflow

atcodedog05_3-1606715356099.png

 

When macro is imported to workflow the optional anchor should be grey in color.

In the above example i passing the optional tax in one and not passing in other.

 

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @memphis_data 

 

I think issue in your workflow might be.

atcodedog05_2-1606715599209.png

Since no data is passed for ID its not asking for mapping.

But since you are passing data for Description its asking for mapping.

 

For an Input anchor to be optional no input connection should go to it.

 

Hope this helps 🙂

 

Provide your workflow we will be happy to look into it and fix it🙂

Labels