Skip to Content mrc logo mrc logo
  • 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
  • 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 & Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Development Services Training Mentoring
  • Overview Partners Press Releases Careers Events Contact Blog
  • Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • m-Painter
  • Key Pairs
Back to Manual

Key Pairs in m-Painter

Click here to access current documentation for this feature.

This document explains how to implement the Key Pair feature within m-Painter. Key Pairs are useful for looking up and returning a value for display purposes based on a field substitution value. This grants the flexibility to customize how to display fields to runtime users.

Key pairs may be used in any created application; however, this example here will be using a key pair within the Web 2.0 Report template.

Shown is a generated report to show yearly sales and costs based on a runtime value prompt for product number (PNUM). Many times, we'll deal with fields in m-Power applications like a Product Number, ID, SKU, or some other fields which we want to pass in a report, but do not want to be able to see them. For convenience or readability, it may be useful to substitute the name of the displayed field.

That being said, in this report the goal is to see the product description, rather than the current product number to be displayed at runtime in the selection criteria output. By using the key pair feature, this task becomes very simple.

After opening the Output page in m-Painter, right click on the value where the record selection for PNUM is being displayed. On the drop-down menu, select ‘Insert/Edit Key Lookup’. The following menu options are explained below:

-Apply to Field: The selected field where a substitute field name is to be applied to
-Lookup Retrieval: Select the JSON lookup retrieval or Quick List already created. JSON templates allow you to create a list of name/value pairs in order to display different field names for any particular application field. The value being passed in the lookup retrieval must be the same value as the sequence key in the JSON lookup. More on creating JSON templates can be found here. Quick Lists allow user generated table-driven list or static list to create these name/value pairs in m-Painter without needing to leave the current application. More on Quick Lists can be found here.
-URL: The JSON lookup retrieval or Quick List URL (automatically populates)
-Field to Return: From the dropdown, pick the field substitution value to be displayed at runtime. In this application, product description is to be displayed, so ‘PDESC’ will be the field to return

When completed, press OK:

After saving these m-Painter changes and reloading the report, product description will be displayed in the selection criteria output for the selected product, rather than product number.

Created: September 5, 2017 | Modified: November 14, 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

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

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


© mrc. All rights reserved.