I am a novice with macros but understand the value they offer. I am attempting to build an iterative macro to loop through a data set that I have. I'm a visual learner (an explainer) so I will explain with some illustrations and hopefully someone can help me understand what I am doing wrong. I have also attached my file for reference. I did at one point get it to run, but only ran the even numbered rows. When I tried to fix it, I made it worse and cannot seem to get back to that point. I will outline what I've tried and what happens and hopefully someone can help me make sense of it!
My data set is structured with a column for block group ID and then values for each of those ID's. I want to determine the top 5 values for each block group ID and have a final output of those top categories for each BG. I will have other data sets that I would like to run so I thought the iterative macro made sense.
Sample Data Set
I pull this data into the module, join the BG spatial objects and then add a record before it heads into the macro.
Data Module
When I run the module, I get the error: "Tool #10: Parse Error at char(1): Unknown variable "RecordID"". I know that the data that is going into the macro has RecordID included- both what's coming through the module and the file input that I used (see below).
Macro
Macro Input Data
I've even gone so far as to add the RecordID tool into the macro and unselect the duplicate field. However, I get an error stating: "Tool #22: The Crosstab was set up for a Numeric field type and a String field was found.". I tried changing the BG value to a numeric value and that does not work. I cannot change the Name value to numeric as it's truly a string. I've tried re-configuring the interface properties to see if that would make a difference and it did not.
So aside from all of the weird things happening that I cannot seem to resolve, I also do not know if I've even set this up correctly to run in the first place. Any help would be so greatly appreciated!!