Table of contents

 


Official Content

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

SDParmOutTRN

Step 2 - Create the Prompt

Create two Smart Devices Panels, one to use as a prompt, the other one for entering information.

Prompt

Add a grid to the SDPanel which will show all the countries of the Transaction created in step 1.

Layout

SDparmOutPanelPrompt

Rules

parm(out:&varCountryId, out:&varCountryName);

Event & Actions

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!

Step 3 - Invoke the prompt

Lets create the panel to invoke the Prompt.

Layout

SDParmOutrEnterInfo

Rules or Events

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;

Execution

sdparmoutExecution1 sdparmoutexecution2 sdparmoutexecution3

 

 




Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant