Scope after header button click

Scope after header button click

@Office Office

Hi,

I would like to send a PDF report to current RUN user with data taken from currently chosen device on blueprint dashboard.
I already know how to do something similar using Input Form, but now I need it to be done with widget header button. In Input Form I could find device ID in scope.origin, but when I run the analysis via header button the scope is empty.
How can I pass the current device ID to the analysis scope then?