Alteryx Designer Desktop Discussions

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

Macro for Multi Field Formula

YanishDewan
7 - Meteor

Hi all, 

 

I am hoping someone can help me with the following - 

 

I have a case whereby I am testing multiple string fields to check what the length is, if the field is not empty or is in Upper case. I am trying to develop a macro which will accept the various field using a select tool but the length of the field in the multi field formula expression is an input parameter from the macro.

 

I am fairly new to macro and I am not too sure how to do this - I have included an attempt to it as attached but I do not think this is the correct way. Could anyone please help?

2 REPLIES 2
jamielaird
14 - Magnetar

Hi @YanishDewan 

 

I think you're on the right track.

 

I made a couple of improvements to your workflow as follows:

 

  1. Since the multi-field formula tool tests all fields, there doesn't seem to be any reason to have field mapping enabled on the macro input
  2. To avoid the 'pass' or 'fail' value overwriting the original value being tested I modified the multi-field formula tool to add a new column prefixed with 'Result_'

 

See attached (I've included some dummy data) and if this isn't giving you the result you are after let us know what needs to be different.

 

Cheers,

 

Jamie

Screenshot 2019-07-24 at 16.25.11.png

YanishDewan
7 - Meteor

Hii @jamielaird, 

 

Perfect thanks a lot!

Labels