Sorting repeating group by option set

@alan5
As far as I know - there isn’t a native way to sort a data type (thing) by something in one of it’s option set fields. AKA - Your artifact has a Option Set Field, called Priority, and Priority has a numerical value you want to sort by (your situation). There is a large thread about this stuff here as well.

You can always modify your workflows to copy this numeric over but it may get hard to manage depending on your data structure and how it’s interacted with - however…

One thing you can do however that I believe gets you want you want is a nested repeating group. You can sort Option Sets by a Attribute of that option set (Priority as Numeric in the photo above). So what you want to do is put a repeating group of type Priority - sorted by that numeric, and then inside that repeating group put a search for the artifact with a constraint of the priority being the parent priority.

You can get creative with the filtering, sorting via ascending/descending, or other stuff with either states or dropdowns or whatever, and put more constraints on the inner search for the artifacts.

See Version Test and Dev Mode

2 Likes