Hi @ComplexPoint thank you for your reply. Im not familiar with Java at all unfortunately so I am not sure exactly how to use this. Was there a final variable in there that would reflect the new list in a display window?
The value returned by an Execute Script action can be assigned to a variable (set the option at the top of the action) – see the attached example.
Thanks @ComplexPoint but this seems to be a bit over my head and I keep getting a blank display window This is where I am at. I can make the list to include Variable D as seen in the macro below. I have tried cobbling together the actions from the macro created by @JMichaelTX in this thread....
but as I would expect when I add another part to each line, that being the new Variable D, and and go from
VariableA, VariableB, VariableC
SK BDC ,178554794,178964282
VariableA, VariableB, VariableC, VariableD
SK BDC ,178554794,178964282,409488
it throws off the macro and the groups are not created correctly. I think there is a simple tweak in there I am not getting that would find and organize each group as the original macro by @JMichaelTX intended. That would be the first step. The second step would be adding the Variable D together for each of those groups and I imagine creating a new list with each line consisting of Variable A and the sum of variable Ds for that particular group.
This is a very simplified example but it would take a group like this...
SK BDC ,5,15,10
SK BDC ,20,30,10
SK BDC ,40,50,10
SK BDC ,60,70,10
SK BDC ,80,90,10
and the macro would then make that group into one line that was the sum of VariableD to look like...
SK BDC ,50
and of course make that single line with each group name (Variable A) with the sums of Variable D for each particular group set.
With the final step being a numerical ordering from highest Variable D to lowest Variable D
If the workflow has KM actions and regex that I can put into an online tester (like the link I provided) it is much easier for me to grasp what is actually happening and why. Then if something goes wrong I have a greater chance of solving it myself than posting on the forums.
still no dice unfortunately. Thank you so much for trying @ComplexPoint I really appreciate it. I have to make this work on this computer though since I want to run macros on this dinosaur while working on a newer computer at work.
OK, thanks for testing.
After some more testing on my end, it looks like to me that your data has a mixture of CRs and LFs, which is causing confusion. The \R should have fixed that, but maybe your old macOS has not been updated.
So, I tried another approach, in which I first replace all CRs with LFs.
Now we have a clean set of data.
This works on my end. Please give it a try:
MACRO: Compile List of Groups by Max Difference [Example]