Lego Boost Variable setting
Looking at this site:
https://legoboost.blogger.de/stories/2709388/

It is in German but I think this picture:


is the important one.

After these settings you have a global value in the white program block.