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.

Create (standard ) macro for different fields but same tools used

Shaina1
8 - Asteroid

Hi, 

 

I'm fairly new at using macros-I have a workflow in which I know I have to use a same set of tools multiple times-the only difference being that 2 of the fields need to get substituted. I'm attaching my workflow for reference as well as the excel sheet separately. Currently, my workflow is using the fields which are marked in yellow in input file along with the other fields (except those which are marked in orange). I need to repeat the same process for the fields which are marked in orange along with the other fields (in this case exclude those which were used earlier-aka the yellow fields). 

I believe a standard macro should cover this-I know I could probably repeat the same process for the orange fields and then package it up as a macro as well as package up the yellow fields-that would essentially create two standard macros-but was wondering if there is a way using a single standard macro to reference the repeatable process. 

I don't see the point in using batch macro as I don't want to stack one over the other-i want two sep workstreams -one which I created in workflow containing period and FTE Calculation denom(yellow fields )-the other one should contain Field 2 Value and FTE Calculation denom field value 2. These 2 workstreams I will then join together using a join tool. 

3 REPLIES 3
JoshuaB
Alteryx Product Evangelist
Alteryx Product Evangelist

Hey @Shaina1 !

 

There are a couple ways to think about this when it comes to building a macro. 

 

1. You can build a macro that handles this process AND when you provide data into it, only provide those exact fields that you want the calculation/process completed on. So for use #1 you would provide the yellow fields ONLY and then use #2 you would provide the orange fields ONLY. 

 

or 

 

2. You can use the "Show Field Map" in the Macro Input Tool configuration to dictate which fields map into what your workflow is built around

JoshuaB_0-1664752535462.png

 

Let me know if this makes sense for you! More than happy to provide more. 

Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
Shaina1
8 - Asteroid

Hey @JoshuaB ,

 

Thanks for your response ! I did try out the 2nd option which you suggested but doesn't seem to be applicable in my case. I have shared my workflow with you-would you be able to replicate what you have suggested in option 1 as I feel that I'm using only the fields which I need in my workflow. I'm using the yellow fields and the non orange ones in this workflow-I would like to substitute the yellow fields (input file ) with the orange fields and keep the remaining fields-I'm not sure how I can use only yellow or only orange fields as my workflow requires that I use other fields as well. If possible could you kindly update my alteryx workflow with what you are suggesting. Thanks !

JoshuaB
Alteryx Product Evangelist
Alteryx Product Evangelist

Hey @Shaina1 

 

Sorry for the delay. So take a look at this as a starting point. It has the basic macro with the field mapping turned on. Now you just need to only select/prove the 1st set of fields into the macro (not both the yellow and orange fields like you are doing today). Then when you want to use it you select the fields you want. Notice I am just showing examples where I use the different field names

 

JoshuaB_1-1665258629231.png

 

 

 

Hope this helps! 

Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
Labels