We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating a macro to remove unwanted records

jmarcuzb
7 - Meteor

Hi guys. I have a problem I just cant seem to figure out. I thought I had a solution but it doesn't work for some reason. If someone could either identify why my macro doesn't work or offer a better solution, that would be great.

Here is the problem.

 

1. I have a set of records, and each record has a unique id. 

 

IDFirstNameLastNameTitle
1TImJonesVP
2JerrySmithSVP
3TomWilliamsAVP
4JonDavidsEVP
5MarkDavisCFO

 

2. I have identified the ids I need removed and have them in a list

 

ID
2
4
5

 

3. Macro Settings

     a. I have created a batch macro containing a filter that filters by default ID=2

     b. There is a control parameter

     c. There is an UpdateValue Action with "action type" = "UpdateValue(Default)"  with Expression - value = "[ID] = 2", Mode - value="Custom",   Replace a specific string set to 2

 

4. The macro is being passed the entire data set from the initial workflow in step 1 and also the "list" of IDs I want to be removed.

 

Here is the issue. Even though I am passing it a list of the 3 ids shown above, it is only filtering out the first ID listed (ID=2). The others are not removed.

I thought the macro would run 3 times and each time it would grab the next id in the list but it is not working.

 

This cannot be a simple filter because these IDs are dynamic and I have no way of knowing what the IDs will be on every run.

 

Can anyone help me with this? 

 

Thanks guys.

 

10 REPLIES 10
ChrisTX
16 - Nebula
16 - Nebula

For the sample workflow and macro you posted, what output are you expecting to see?

 

Does it really need to be a Batch macro, or could it be a Standard macro?  I don't see any functionality that requires batch functionality.  I know this may be a sample, and you're actual macro may be more complex.

 

Inside the macro the filter criteria is set to ID != 2.   Not sure if the "not equal to" is intentional.

 

Chris 

 

Labels
Top Solution Authors