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
  • Deprecated Documentation
  • Changing Maintenance Modes via URL Parameters
Back to Manual

Changing Maintenance Modes via URL Parameters

 

When you utilize a Single Record Maintainer, you can set the default mode of the application to be either Add, Update, or Delete. But what if you want an application to add and update, for instance, based on what link a user clicks? Rather than making three separate applications, you can control the action of the maintenance application based on the parameter you pass to it.

For this example, we will utilize M00100s in Data Dictionary HURCKES.

After building a basic application, we can enter m-Painter and click the "Application Properties" button.

Under the "Program Options" tab, you can see we have a parameter titled "default_mode".

Here it has been set to add mode.

Running the application:

We see that we are in standard "Add" mode for data entry. However, I can modify the URL so that I can directly access this Maintainer in Update mode. In essence, I am overriding the "default_mode" at run time.

Rather than running the application as HURCKES.M00100s, I will now run it as HURCKES.M00100s?action_mode=UVK&CUSNO=222223, resulting in this screen:

Notice that this link automatically called the application, pulled back the record where the key field (CUSNO) was equal to "222223" and now allows me to update any field other than the key field.

You have many other options, as well, including prompting a user to enter in data or to perform the data change directly via email. See the below directions:

action_mode required:

 

ADD

UPDATE

DELETE

Prompt

AVK&slnk=1

UVK

DVK

Perform

AUR

URD

DDR

Prompt, Add mode

For example, adding a record in while passing values:

HURCKES.M00100s?action_mode=AVK&slnk=1&CUSNO=9999&CNAME=ZTrikes

Perform, Add mode

For example, adding a record via a single click:

HURCKES.M00100s?action_mode=AUR&CUSNO=9999&CNAME=ZTrikes

Prompt, Update mode

For example, updating a specific record:

HURCKES.M00100s?action_mode=UVK&CUSNO=9999

Perform, Update mode

For example, updating via a single click:

HURCKES.M00100s?action_mode=URD&CUSNO=9999&CNAME=ABikes

Prompt, Delete mode

For example, delete a record, confirm with user first:

HURCKES.M00100s?action_mode=DVK&CUSNO=9999

Perform, Delete mode

For example, delete a record in one click:

HURCKES.M00100s?action_mode=DDR&CUSNO=999

Note: Parameter names are governed by HTML laws, which require case sensitivity — "CUSNO" is different than "cusno".

One Step Mode (Hiding the Maintenance Display)

So far we have dealt with how you call the maintainer and then allow for the user to type in new values in any fields that they choose. We may wish to call the maintainer and pass the new values for the update fields to the maintainer, asking it to execute the update directly for us, without even displaying its screen to the user.

One of the hyperlinks described above to update a record currently looks like this:

HURCKES.M00100s?action_mode=URD&CUSNO=9999&CNAME=ABikes

To make it automatically carry out the update we need to add the following to the end of the hyperlink string:

&one_step=1&all_redir=HURCKES.I00001s

The whole string now looks like this:

HURCKES.M00100s?action_mode=URD&CUSNO=9999&CNAME=ABikes&one_step=1&all_redir=HURCKES.I00001s

These additional parameters are as follows:

one_step=1

This instructs the maintainer to execute the update in one single step, without showing us any screens.

all_redir=HURCKES.I00001s

This instructs the maintainer where to redirect after it has completed the update. In this case it is redirecting to a retriever, but it could be to any page that you choose.

Created: February 29, 2008 | Modified: August 21, 2013

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

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

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.