How to refer to the chosen entry in a dynamic button for later use

Here's an example: