I tried the
'Collapse to Level of Selected Item.scpt' applescript and it works as expected, though slowly.
I'll comment though that the name is a little confusing. The name implies that the script only collapses; however, as expected, it toggles the row's Collapse/Expand property.
Thanks though; this is very helpful. Hope to see it built-in and faster someday!
qomni