I have several buttons on Layout1. Each of them sets global variable to another value and switches to Layout 2. Variable is used to filter data, show/hide objects on Layout2, etc.
I made separate script for each button. Script has two steps:
Set variable ($$zxc ; value = "some text")
GoTo Layout (Layout2)
But I tried to set a name to each button (inspector) and get this name by clicking a button and then set it to my variable.
Set variable ($$zxc ; value = get(ActiveLayoutObjectName))
But this does not set the value.