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

BatchMacro ?

Evaldas1
5 - Atom

Hi,

 

Bit stuck with batch Macro.  Not sure if I picked the right tool to achieve it.

 

The problem: I want to apply a formula to a text fields. For simplicity lets say UPPERCASE() 

Table1 (List of String Fields) :                  Table2:

Fieldname                                                  Name  Street   Phone   Date 

Name                                                           Jack     Case    5556       04/23/1986 

Street

Can I set up a batch macro that would take Field names from Table1 and Uppercase(Override values to uppercase) for those on the list?

I tried, it seems that Batch Macro can apply different operations within a single field, but cant get to apply same operation to a multiple fields?

I know about Multi-Formula tool, that would solve this. In this case I need to avoid it as a solution. There is a separate macro that I would like to deploy against multiple fields. The "UpperCase" function in this example is for simplification of example. 

Any thoughts? Thank you in advance.

6 REPLIES 6
fmvizcaino
17 - Castor
17 - Castor

Hi @Evaldas1 ,

 

I would suggest you to use the transpose tool before the function you need to use to get all columns to a single one, that way you can do whatever you need with that field.

 

I'm not sure if you need a batch macro for that, a standard macro would do the deal, if I'm not simplifying.

 

Best,

Fernando Vizcaino

 

Evaldas1
5 - Atom

It makes no difference which macro as long as I get the result.  I can put all values in one field, that's simple. However, the flow is being built not for a single, one time analysis. I need each field to stand on its own. 

fmvizcaino
17 - Castor
17 - Castor

Hi @Evaldas1 ,

 

All of this would be inside your macro, you would do the transformation but to return it back to its regular format. 

fmvizcaino_0-1617722357157.png

 

If this doesn't work, please tell me a little more about the complexity of your process, then I wll try to build something for you.

 

Best,

Fernando Vizcaino

 

Evaldas1
5 - Atom

Now I see what you meant. I like your solution a lot. Thank you, that was good and not overcomplicated. 

One little thing if I may ask, in my data set I also have dates and numbers. My macro that I use insted of "Upper" function does bit of damage to those fields.

I can manually decelect those, but still thinking of a bit more "elegant" solution.  That's probably main reason where I started looking at batch macro, cause that way I can produce list of fields that are strings.

Maybe you have an idea to further refine it? 

Many thanks!

Shalz
8 - Asteroid

I think Data Cleanse will solve your issue..

Check only Name field and apply Case modification to Upper and the remaining fields unchecked 🙂

fmvizcaino
17 - Castor
17 - Castor

Hi @Evaldas1 ,

 

Sorry for taking so long, I wrote the response and forgot to click send, go figure.

You can use the dynamic select tool and check the data types you want to check or uncheck.

fmvizcaino_0-1617744039073.png

 

 

Best,

Fernando Vizcaino

Labels