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.
Step 1 - Create the model#
Create the following Transaction
Step 2 - Create the Prompt#
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.
Event & Actions#
&varCountryId = CountryId
&varCountryName = CountryName
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!
Step 3 - Invoke the prompt#
Lets create the panel to invoke the Prompt.
Rules or Events#
Note: This prompt can also be invoked using the Prompt Rule.
prompt (PromptSDCountry, &vCountryId, &vCountryName) on Button1;