Thanks, I managed to figure it out eventually so this can be closed.
I’m not sure it meets all my requirements but I’ll play around today and see.