Hello Lisa,

have you try checking my script mentioned above? its similar to your requirement.

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade