mrc logo mrc logo
  • m-Power m-Power
    What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • Solutions Solutions
    What does m-Power build?
    Overview Database Front-Ends Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization Spreadsheets to the web MS Access to the web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs and Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Services Services
    Development Services Training Mentoring
  • About About
    Overview Partners Press Releases Careers Events Contact Blog
  • Support Support
    Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • m-Painter
  • Quick Lists
Back to Manual

Quick Lists in m-Painter

Click here to access current documentation for this feature.

The Quick Lists feature in m-Painter can be used for quickly generated dropdown lists, AJAX features, application lookups, and key pairs. This can be very handy and efficient when customizing your applications within m-Painter, as quick lists allow you to create a list within the current application, rather than creating additional applications.

Quick Lists can be made into two types of lists:

–Static List: Create a custom list of key pairs (value/description). These are only used for dropdown lists. Since they are static, they are not tied to any specific database table. Static Lists may be used to create option lists and key-value lookups, and really become useful when you would like to change the values/descriptions without pulling from a created database table.
– Table Driven List: This will create a list of field values, retrieved from a single database table. These are more robust than static lists in terms of functionality. Table-Driven lists may be used to create option lists, ajax features, return data and key-value lookups.

Static List

Static lists allow for the creation of a custom list of key pairs (value/description). These are only used for dropdown lists and key pairs. Since they are static, they are not tied to any specific database table. Static Lists may be used to create option lists and key-value lookups, and really become useful when you would like to change the values/descriptions without pulling from a created database table.

An excellent use case scenario for a static list would arise while working with dates, specifically months. In this example report, a handful orders from the past year may be seen.

With a runtime selection and dropdown list currently added in, the orders can be filtered conveniently by month. The list displays all possible values for month that may be selected at runtime (1,2,3…12). While this list makes sense, being able to display these values as their month names rather than a number would be more practical to the end user. Creating a Quick List will be the easiest and quickest way to do this.

In m-Painter, open the Output page, and right click on the field for the month dropdown and select Insert/Edit Option List.

For Option Data Source, select External Retrieval. Select the new button that has appeared, Add/Edit Quick Lists.

The following menu displays any previously created Quick Lists that have been made in other applications. These Quick Lists are easily accessible from this menu, and may always be updated/deleted as need be. To add a new Quick List, select ‘Create New Quick List’, and choose Static List. The Create/Edit Quick List menu is explained below:

List Information

-Name: The name to be given for the Quick List being created
-Description: The description to be given for the Quick List being created

Add Item to this list

-Value: The actual values for the field that are being submitted to the database when the application is ran (in this example, the month numbers)
-Description: The substitute name for the field values which will be displayed in the dropdown list (in this example, the month names)
-Add Item to List: Creates the value/description pair and adds it to the option list

List Items

All the value/description pairs created will show up here. Note: The new dropdown Quick List will display the fields at runtime in the same order as they are arranged in this list.
-Remove From List: Remove the selected value/description pair from the list
-Move Up: Move the selected value/description pair up one row.
-Move Down: Move the selected value/description pair down one row.

After adding in all the value/description pairs for the dropdown list, press OK.

The Quick List just created does not appear instantaneously in the available quick lists after its initial creation. Select Refresh List and the Month Quick List will now appear.

Back at the Insert/Edit Option List, select the refresh button next to the Select External Retrieval dropdown and then select the created Quick List. Press OK.

After saving changes in m-Painter and rerunning the application, the dropdown list on the prompt page for month is no longer listing numeric values for month. It is now listing the month names (descriptions) we assigned to the numeric values.

Table-Driven List

Table-driven lists are the perfect option when making a static driven list would be impractical and there are too many key pairs to type in manually, or this list will need to be changed/updated frequently via a Maintainer.

A helpful example for using a table-driven list is to consider a report on a customer list, which includes a runtime value prompt for state, allowing the user to select a state’s initials to filter the customers by. Like the static driven example above, we can change these displayed values to read a more practical description, such as the full state name. However, keying in 50 different value/description pairs for state initials and state name in a static list would not be practical. Using a table-driven list with state names from a premade table would make much more sense.

It is important to remember, while this example covers a dropdown list, Table Driven lists are not limited to this. They may be applied to any other application which incorporates AJAX features, return data, or key-value lookups.

In m-Painter, open the PC Prompt page. Right click on the field for the state dropdown and select Insert Edit Option List.

For Option Data Source, select External Retrieval. Select the new button that has appeared, Add/Edit Quick Lists.

The following menu displays any previously created Quick Lists that have been made in other applications. These Quick Lists are easily accessible from this menu, and may always be updated/deleted as need be. To add a new Quick List, select ‘Create New Quick List’, and choose Table Driven List. The Create/Edit Quick List menu is explained below:

List Information

-Name: The name to be given for the Quick List being created
-Description: The description to be given for the Quick List being created
-Select a Table: Choose which database table in your current dictionary that the values fields and descriptions will be accessed from
-Select a Field to Add: After choosing a table, select the fields from this table that will be added to the quick list.

Selected Fields

Any fields that were added from the above step will show up here.

-Name: Field name
-Description: Field name description
-Sort: Allows user to sort all values for the current field. If set to the default ‘N/A’, values will appear in the same order that they exist as in the database table. Other options include Ascending and Descending.
-Value/Desc: Specifies the selected field to either be a field value, or a description.
-Relation: Selects relation for the field value/description to be filtered on in the created quick list. Options include ‘Equal to’, and ‘Not Equal to’. This will be most useful if you are trying to include/exclude certain values from displaying in the list.
-Value: Specify the hardcoded value that the relation will be compared against.

After adding all the necessary fields from the table, press OK.

The Quick List just created does not appear instantaneously in the available quick lists after its initial creation. Select Refresh List and the Table Drive Quick List will now appear. Note that the Type specifies whether the Quick List is a “Static” or “Table” list.

Back at the Insert/Edit Option List, select the refresh button next to the Select External Retrieval dropdown and then select the created Quick List. Press OK.

After saving changes in m-Painter and rerunning the application, the dropdown list on the prompt page for month is no longer listing state initials. It is now listing the state names (descriptions) assigned to the state initials (values).

Additional Note: Created quick lists are stored are in the 'quick_lists.json' file within /mrcjava/WEB-INF/classes/DICTIONARY. To use your quick list(s) in production, please promote the 'quick_lists.json' file over to this same location in production.

Created: September 11, 2017 | Modified: December 6, 2023

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

DB2 Security Email External Objects Reports Performance Summaries Bootstrap Templates m-Painter RPG Freemarker Graphing Video Administration Graphs Admin App Properties mrc-Productivity Series Maintainer Report Popular Parameters SQL Excel Application Properties Advanced Compiling Production Bar Graphs Dates Java Retrieval Form Validation Graph Properties Calculations Build Process Record Selections Getting Started Dropdowns Tomcat Data Dictionary Maintainers Prompt Screens Database Retrievals

See all tags »

michaels, ross & cole, ltd. (mrc)

Privacy Policy Cookie Policy Cookie Settings Notice at Collection Do Not Sell or Share My Personal Information

mrc (US)

2001 Midwest Road
Suite 310
Oak Brook, IL 60523
630-916-0662

mrc (UK)

Mortlake Business Centre
20 Mortlake High Street
London, SW14 8JN
+44-20-335-59566


© 2024 mrc. All rights reserved.