When I want the user to select a value then do a lot with the returned result, I make the field computed and add a button that presents a data set the user can select from and then run code on the result. If I need a value and nothing is returned, I let the user know and stop executing the code.