Hi,
I have a table which describe some check rules to be applied on some files, like this:
| rule id | colum | comparator | value | filename |
| r1 | A | < | 25 | file1_dummy.xlsx|sheet1 |
| r2 | X | = | 42 | file1_dummy.xlsx|sheet1 |
| r3 | G | > | 13 | file2.xlsx|sheet2 |
In this table, I have 3 rules:
- r1 and r2 must be applied on file1_dummy.xlsx
- r3 to be applied on file2.xlsx.
I try to create a "batch" macro wich take in control parameter a table with the unique list of files:
| filename |
| file1_dummy.xlsx|sheet1 |
| file2.xlsx|sheet2 |
and in input the first table.
Into the macro (yxmc), I've done some dummy treatment like:
- counting the number of row in the file,
- and counting le filename length;
then output all this.
Note that I have 3 lines in file1 and 4 lines in file2.
The input module, is the copy/paste of data of the first line of the first table (and I've put the same name in the header row).
It's confogured to be a "batch macro".

Finally I try to use my macro in my main workflow (yxmd) in many ways / configurations :
- Without any grouping, it output 2 times the first line:
| count | rule id | colum | comparator | value | filename | Length |
| 3 | r1 | A | < | 25 | file1_dummy.xlsx|sheet1 | 23 |
| 3 | r1 | A | < | 25 | file1_dummy.xlsx|sheet1 | 23 |
- With Control GroupBy Field : filename, I have the same result:
| count | rule id | colum | comparator | value | filename | Length |
| 3 | r1 | A | < | 25 | file1_dummy.xlsx|sheet1 | 23 |
| 3 | r1 | A | < | 25 | file1_dummy.xlsx|sheet1 | 23 |
- With Control GroupBy Field : filename and, Input GroupBy Field: filename; the output is a little bit more interesting, but not yet what I want:
| count | rule id | colum | comparator | value | filename | Length |
| 3 | r1 | A | < | 25 | file1_dummy.xlsx|sheet1 | 23 |
| 4 | r3 | G | > | 13 | file2.xlsx|sheet2 | 17 |
If I use any other filed in Input GroupBy Field; it make an error at the execution as the input file Worksheet1.xlsx is not existing.
What I excepted to have:
- my macro be called 2 times with 2 chunks (grouped by filename)
- 1 chunck for file1, with 2 first line in input
- 1 chunck for file2, with 1 last line in input
And so that, it will load each file only 1 time (and so here in my example, not load the file1 two times).
How can I achieve this?
Regards,
Alex