Standard Macros in Alteryx

by Ivan Duniak

A macro in Alteryx is a combination of tools that are created to run a specific task. In this blog I will create a standard macro, basically I will a create a group of tools that I will then use in another workflow as one tool.

One example of a standard macro is the data cleansing tool.

As you can see it’s a lot simpler to just use one tool for data cleansing instead of using the whole of the workflow. This has numerous of benefits: makes it a lot simpler for the user, easier for the user to interact with the workflow, saves times and automates a repetitive task.

Let’s create a Macro that will return a number in hundreds, thousands and millions.

The data is saved as State populations in the OneToolData file

Lets create a new workflow, drag the input tool from the Interface section and create some test data for the workflow.

Lets add a formula tool and make the number 1000 updatable by the user. To do this I’m going to add a drop down tool and write the text I want the user to see when updating the quantity. From the list of values I will select “Manually set values (Name:Value-one per line)” and write one option per line that the user will choose.

Now we need an action tool to actually make those changes created by the dropdown. To do that we can connect the bottom of the drop down to the lightning bolt of the formula. In configuration tool select the “Update Value (Default)” and we can then expand the options to find our formula. Select the formula and delete everything except the 1000 value at the bottom.

Finally we need to add an output anchor for the macro output and save the macro. Now go back to the original workflow, add select tool to change the data type into Double and remove the 2 fields that are not used and insert the macro.

Fri 26 Nov 2021

Thu 25 Nov 2021

Wed 24 Nov 2021

© 2022 The Information Lab Ltd. All rights reserved.