Hi Luis,
I've tried the following configuration to test this behavior and it works as expected on my side:
Added a button to call the logic:
And this is the script logic:
Please try this configuration and verify that it works properly on your side, too.
Regards,
Eyup
Progress Telerik