How do I prompt a user to enter some text that I can store into a variable?
You write a script that uses a global field in the Show Custom Dialog box.
Then you Set Variable to that global field. Though, you could just use the global field for whatever you're using the variable for, depending on the use.
A workaround for without creating field for dialog...
Enter Find Mode 
Show Custom Dialog [use any field for input]
Set Variable [$var ; the field]
Enter Browse Mode 
You can use "New window" positioning out of screen to hide find mode.
Global fields are best for this. However, I sometimes "borrow" another field for this purpose. In this case, I will temporarily use the CustomerName field as a dialog input field:
Set Variable ( $temp ; CustomerName )
Set Field ( CustomerName ; "" )
Show Custom Dialog ( with the CustomerName field as the input field )
After completing the process:
Set Field ( CustomerName ; $temp )
Just be sure to return the contents of CustomerName even if the user clicks Cancel on the dialog box.
there are feature requests for this
Custom Dialog input to variables
Retrieving data ...