Passing current device id from blueprint dashboard to analysis

Passing current device id from blueprint dashboard to analysis

@Office Office

Hi,

On a blueprint dashboard, I have a widget with a button “Generate report”. After clicking, it should grab X values from the currently selected device and send to some email address.
I’ve already found topics which explain how to create device token using its ID, but I don’t know how to pass the ID from the widget button click to the analysis script.
I know I can pass something with the scope, but those are hardcoded values, so that doesn’t really help here (or at least I don’t know how to use it).