How about this? I‘m not 100% sure the expand is how you would like it, but I don‘t have a Mac and can just test on iPhone and iPad.
It uses the window for expansion and can‘t be tested reliably on iPad with multiple OF windows open, because it‘s non-deterministic which window has index 0. SortSelectedProjectsByDefer.omnifocusjs (1.5 KB)
Thanks Logan! This works really well. Some of my Projects have folders within them and then Tasks within those Action Groups. Can the Automation also sort Tasks within each Action Group by Deferred Date?
@Mike_N That should be possible. Before I start, could you give me a few screenshots of typical scenarios? Can the action groups have defer dates as well? How deep could this go? …