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!
Solved! Go to Solution.
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.
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.
I may be well out in terms of understanding what you want, but perhaps I'm not!
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
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!