I have a macro to add a single business day that is only running on the first row of my data. Other macros run on all data rows. I am new to using macros, any tips to troubleshoot?
thanks!
Jason.
Solved! Go to Solution.
The issue is your filter on the [RecordID] near the last step of the macro.
I have attached a new macro (without the holiday.xlsx input since I didn't have that file) that includes a few changes:
I added an additional row to your Macro Input Tool so now there are two [start] dates in the Text Input. This helps to see what is actually happening for multiple rows of input.
Browsing after the Generate Rows Tool you can see that 14 dates are generated, as expected. Seven rows for each of the two [start] dates in the Text Input.
However, later, when you add [RecordID] and filter for 2, this outputs only 1 row. It takes all 14 rows for both [start] dates, numbers them, and then filters all but the second. This means you are only getting the expected output from the first date in [start] (because that is [RecordID] == 2) regardless of how many rows you input into your macro.
So the macro is actually running on all rows, it is just the way you are filtering makes it seem like it is only running on the first because you only see one row of output.
If you need the second row from each given [start] date, I suggest using the Multi-Row Formula Tool and group by [start] to generate [RecordID]. I have included this as an example for you to see in the attached macro.
Thanks, unfortunatly i cant download your file but i understand why it is only taking the 2nd record of each day.
Below is a screenshot of how to set up the Multi-Row Formula Tool to generate a [RecordID] grouped by [start]. This should replace your Record ID Tool.
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |