Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Using output of "Count Records" tool with action

BobR
8 - Asteroid

I've attached my sample workflow and two macros for clearer demonstration. 

 

I'm building some utilities for our group. One of the things I need to do is group together lists using the tile tool. The strings this macro generates will ultimately be used to replace the xxxx in a sql statement such as "where fieldA in (xxxx)" in a batch macro.

 

I'm trying to push as much logic as possible into into the macro so we don't need to repeat logic in various workflows. In this case I need to count how many keys I have and figure out how many tiles to create. Provided is an example of this working, yet the count and formula to calculate the number of tiles is in the workflow rather than within the macro. Hence the macro takes the key list input as well as a ControlParameter input that is the number of tiles. 

 

I'd like the macro to just take the key list input and then perform the count and formula within the macro. I've provided that example too. 

 

My issue is that I can't figure out 1) how to connect the output of count to the action. Or 2) I can't figure out how to do this entirely within the update with formula option in the action. 

 

I've searched all over the forums, but haven't found a solution like I normally can. Any help would be appreciated. Thanks.

 

Bob

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

@BobR

 

While I'm usually the first person to recommend the Tile tool, it's not necessary in this case. I've attached a solution that doesn't require a macro. I had this available because I needed a solution for the same thing (creating a list of strings to update a query WHERE clause).

 

 

BobR
8 - Asteroid

That solution is simple and works well for the problem I'm solving. 

Labels
Top Solution Authors