Using Prompt Maintainers within a Retrieval

 

The purpose of this document is to explain the process needed to have a user interface in which end-users enter a value on a Prompt page, then are redirected to a retrieval. The retrieval shows them the appropriate information based on the data entered from the Prompt.

To make this application, you will need to create the following:

· Multiple Record Retrieval (data output)

· New Table (In which the maintenance application will be written over)

· Single Row Maintainer (Prompt Page)

Step 1 — Build your Retrieval (data output)

When building your retrieval, please keep in mind what field you wish to pass to your retrieval. For instance, if I want my end user to search on customer name, I need to remember that the Customer Name field is CNAME. Otherwise, please build your retrieval as you normally would.

Note: Please remember the application number, as you will need it in Step 3.

Step 2 — Build your new table.

The purpose of this table is to serve as a container for your maintenance application data to reside in. In fact, once the data goes into this table, there is no need for the data to ever be examined. Create your table by going to the Admin screen, then click on the Registered Tables option. Lastly, click the "Create New Table" icon.

In the above picture, note that I created a two column table. One will hold a sequence key, while the other holds the name of the field that I wish to search on. In my case, I have named this SEARCHVALUE.

Note: The sequence field should be numeric.

Step 3 — Create your Maintenance Application (The Prompt)

· The Maintenance application needs to be written over the table you created in Step 2.

· Be sure to use the "Single Record Maintainer" template.

· Choose all fields.

· Set the SEQNO field as the Sequence Key.

· Go into Field Settings, and change SEQNO's field description to SEQNO *AUTOSEQ. This will set this field as an auto-sequential field. Click Accept.

·Build your application and click Edit Properties. Navigate to the After Actions tab, select Redirect: Add, and click the blue question mark. This dialog, seen below, will help you choose an application to redirect to, and map any parameters to it. In our case, we want to choose the retrieval made in step 1. In the additional parameters box, enter "rls_CNAME=CT". This tells our target retrieval that we will be searching on the CNAME field and that we want to use the contains search relationship. Lastly choose 'custom' from the dropdown next to our SEARCHVALUE field, and enter val_CNAME. This will map our input search value, to the built in search parameter in our retrieval.

Lastly, open m-Painter. You should see something like this:

Right click on the SEQNO row, and select "Hide Row". While the row will not be hidden within m-Painter, when the application is run, this row will be hidden. Please save your changes in m-Painter.

That's it! Simply run your Maintenance application. Enter part of a Customer Name, and press Accept. Your After Action property will take the user's input and pass it to the Inquiry only showing you the valid records!

Note: Your maintainer will keep a record of all searches that have been entered in the table it is built over. If you did not want this behavior, you could enable the 'Skip Database Action' option in the app properties.

Created: October 22, 2009 | Modified: June 12, 2017