#Dynamic Group Sorting

5 messages · Page 1 of 1 (latest)

thorn drum
#

I have a dynamic group with two auto-cloning WAs inside of it. I want the sorting to be:

  1. WA icon position in dynamic group list: Top WA before the bottom WA.
  2. Remaining time: More time remaining before less time remaining.

An example of how I'd like things to be sorted (first being at the top of this list):
Clone1_1: 3sec left (from WA 1)
Clone1_2: 2sec left (from WA 1)
Clone2_1: 4sec left (from WA 2)
Clone2_2: 1 sec left (from WA 2)

I've tried to use the built-in sorting options but I couldn't seem to get it to work correctly. I made a custom sort that works just fine, but I had to hardcode the name of the WAs (since I didn't know how to get their respective position in the dynamic group list) which I would like to avoid.

So, two questions:

  1. Is it possible to achieve what I want by just using the built-in sorting options and if so which setup should I use? Or do I need to use a custom sorting function?
  2. If I have to use a custom function, is it possible to get the position of the WA in its dynamic group in a custom sorting function?
placid ruin
#

Probably something like:

WeakAuras.ComposeSorts(
  WeakAuras.SortDescending{"dataIndex"},
  WeakAuras.SortDescending{"region", "state", "expirationTime"}
)
thorn drum
#

Thanks!

#

The solution was:

    WeakAuras.SortAscending{"dataIndex"},
    WeakAuras.SortDescending{"region", "state", "expirationTime"}
)

Which was very close!