Assign Role by Dropdown Menu

This article will explain how to test your code, but in short you can run your function from the backend by adding some data manually adn you will see the output. This will help you begin to debug the issue

https://support.wix.com/en/article/velo-about-functional-testing-in-the-backend