Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Question W/ Macro "questions"

DerekVance
5 - Atom

Hello!

So I am fairly new to Alteryx and I am playing around with the macro functionality. Right now I am trying to set up a macro for doing comparisons on data I have loaded.

 

Currently I have a list boxes that you select fields from the macro input to be evaluated. Then I have piped the questions over to a formula node that I want to concat all of the fields together so that I can feed it into a hash generator. So far I figured out I can get the name of the fields into the formula, but not the value. In "pseudocode", I am looking to do something like this:

 

FormulaColumn = JOIN(programatically join fields from [#1])

 

Thanks!

5 REPLIES 5
darryl5280
10 - Fireball

The “Basic Data Profile” tool located under “Data Investigation” and can output the field names for a Data Set.  All the others fields the tool generates can be seen here.

Attached is the sample workflow shown below.

FIeld Names.jpg

 

david_fetters
11 - Bolide

You have a list box that lets you select fieldnames, and your goal is to have it take the records you pass as a macro input and concatenate the values (for only the fields youve selected) into a single string, in the order in which the fields appear in your list box?

 

I think this is probably a use case for the dynamic formula macro that @MarqueeCrew has so graciously released to the community.  I'm not on my VM right now so I can't load up Alteryx, but perhaps he can stop in tomorrow to help you sort this out.  The dynamic formula macro will let you take those field names that you now have as data in your workflow and turn them back into a formula you can use on your data stream.

 

And if you want to get all the field names from your data stream, I would suggest the Field Info tool under the developer tab rather than the data profile tool.  Much simpler.

BenMoss
ACE Emeritus
ACE Emeritus

It sounds like you want a dynamic join?

 

I.e. to join two data streams on the fields selected. This is possible without concatenating values into a single string and then performing a join on that string.

Check out the 'Update Raw XML' option within the action tool and then look at the list box and 'generate custom list' mode. This can be used to create a dynamic join.

 

In order for best understanding of how you can use this functionality check out this post which shows how you can achieve a dynamic summerize using this.

 

https://community.alteryx.com/t5/Data-Preparation-Blending/Remove-a-field-from-summarize-in-a-macro/...

 

I may be well out in terms of understanding what you want, but perhaps I'm not!

MarqueeCrew
20 - Arcturus
20 - Arcturus

@DerekVance

 

Part 1. Explain the "Macro"

Part 2. Build the "Macro"

Part 3. Configure "Macro" Interface

Part 4. Apply Finishing Touches

 

This 4-part series explains how to build a macro where the user selects a field from the input file to filter values against.  You would see a field being selected from a dropdown and then the ability to search the field for contents.  Along with this is the use of a summarize tool being configured based upon the selected field.

 

What I think that you're looking for could be found here as:

MD5_ASCII(String)

If you've got a list box tool where you configure it as "Generate Custom List" (note: watch the video to see how to connect the Macro Input tool to it) then you can take an action to replace "String" with the List Box output.

 

Cheers,

Mark

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
DerekVance
5 - Atom

This did it for me. With this, I was able to select the fields I wanted, and was able to pipe it in to a hash function.

 

Thanks!

Labels