But why does the script work for the button but not for the dropdown?
Anyway, I don't think the forEach loop should be necessary for the dropdown On Select event. Just the first line should be sufficient. I only added the rest to make the script for both components identical.
Why is the selected value not returned for the first bookmark!?