In GeneXus Evolution 2 Upgrade 3 was added the possibility of having SDPanels with a return value. This makes it much easier to do a prompt from scratch.
For older versions of GeneXus Evolution 2 the way to do user prompts is written on the follwing article
For newer versions of GeneXus Evolution 2 Prompts are automatically generated, but if you need to create one you can do it following the next steps.
Create the following Transaction
Create two Smart Devices Panels, one to use as a prompt, the other one for entering information.
Add a grid to the SDPanel which will show all the countries of the Transaction created in step 1.
parm(out:&varCountryId, out:&varCountryName);
Event 'Selected'
Composite
&varCountryId = CountryId
&varCountryName = CountryName
return
EndComposite
EndEvent
Set the Default Action of the grid to be the Action just created.
IMPORTANT: The variables in the Panel cannot have the same name as the Attributes. If that happens, the values are going to return empty!
Lets create the panel to invoke the Prompt.
Event 'Prompt'
PromptSDCountry(&vCountryId, &vCountryName)
Endevent
Note: This prompt can also be invoked using the Prompt Rule.
For example:
prompt (PromptSDCountry, &vCountryId, &vCountryName) on Button1;