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
  • Troubleshooting m-Power Applications
Back to Manual

Troubleshooting m-Power Applications

Debug SQL Statement

Occasionally, m-Power developers need to better understand why their m-Power applications are not working as expected. At our technical support hotline, we’ve noticed that two issues come up frequently: Generated applications are not returning the anticipated record set and Dashboard applications do not render as anticipated. To help with these types of issues, m-Power ships with two useful debugging options.

Method 1:

debug=1

When the application is run, you can see the exact SQL statement used by m-Power to generate the query returned to the screen. Developers can also see a list of any parameters that are being sent through the form submission.

To activate our basic debugging option, developers have two options:

Option A: Go into Application Properties and set the debug option to “Yes”. Debugging will now remain on, until this option is changed back to No.

Option B: An alternative method to activating this debugging option is to forgo setting the application property and instead add ?debug=1 to the end of your URL. Doing so will turn on the debugging logic only for this single visit. Once the developer has navigated away from this page, they will lose their debugging feature.

In either case, the SQL statement can now be analyzed for accuracy.

Method 2:

debug=2

This advanced debugging method is extremely helpful to users creating powerful dashboard applications. To better understand dashboards, they are a collection of a single parent application, and multiple child applications. The child applications are usually referenced in the parent via an import statement.

By applying debug=2 to the URL, the developer’s dashboard will change dramatically. Rather than rendering each individual child application, the page will instead replace the rendered child app with the URL used to call this child app. This is extremely helpful when a dashboard is not behaving as you would expect and you want to verify that you are calling the correct application and passing the right parameters.

With the help of debug=1 or debug=2, an m-Power developer can debug many issues that he may run into when building his applications. Try it out and let us know what you think!

 

Runtime Parameter Listings

Using the URL to call applications can be very helpful when developing applications, especially when using links. However, sometimes knowing which parameters are available for your application can be difficult to remember. The August 2015 release of m-Power includes a runtime parameter listing that will list available global web parameters as well as template specific parameters that you can use with your application.

Included in this new feature is the ability to build and execute the URL with the parameters you choose. The parameter listing page will pull in the fields directly from your app specs and apply them to the available parameters. Instead of showing you "S_[INSERT_FIELD_HERE]=1", there will be options for the fields that apply to that parameter(e.g. S_CUSNO=1, S_CNAME=1, and so on). Simply clicking on the desired parameter will add it to the running URL being generated at the top of the page.

To launch this feature, simply add ?help=1 to the end of the URL and hit Enter.

You will see the template and current URL from the application. The first tab includes a listing of all general parameters with a description, valid values, default value and an example of the parameter being used. Clicking a parameter's name will add it to the running URL at the top. If parameter value is dynamic, simply enter the desired value into the text box. If the parameter value is limited to set values, choose the desired value from the dropdown. To remove a parameter, click on the red 'X' in the running URL. Clicking "Run URL" will execute the URL you've created. The ?help=1 parameter will be dropped when executing the URL.

The second tab is a listing of all parameters that are specific to the template being used. Clicking on the available parameters will add them to the running URL as well.

Release Notes:
Applications compiled prior to the August 2015 update will only have the generic parameters available. The app will need to be recompiled before the template specific parameters will be available.

The parameter listing only supports standard templates that are shipped with m-Power.

Some parameters are dependent on other parameters being included in the URL. If this is true with the parameter you choose, the dependent parameter(s) are appended as well.

All parameter values need to be URL-encoded in order to work correctly. If there is a value that is not URL-encoded, you will receive an alert when trying to execute the URL.


Created: November 29, 2012 | Modified: December 27, 2017

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

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

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.