You may find solution with the mendix client : https://apidocs.rnd.mendix.com/9/client/
Another simpler method would be to take the value that you want from the screen.
If the value in already in the current screen you just have to take it. in jquery it will look like that :
If the value is not in the screen and you have to put it in the screen and put the display to none (will be invisible in the page, but the js script will still be able to take it).
Keep in mind that you may have to put a setTimeout in your script to be sure your data is loaded before the script.