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
  • Retrievals
  • Ad-Hoc Sorting on Multiple Columns
Back to Manual

Sorting on Multiple Columns Via URL

At runtime it is possible to sort on more than one field via parameters over the URL, by doing this developers can easily reuse applications to satisfy many end user sorting requests. Being able to sort on multiple columns allows an application to display data in multiple ways, eliminating the need for multiple applications.

For instance, multiple column sorting can be helpful when there are users that need to see the same data sorted in different ways. Instead of having to build multiple applications and use different sequencing to achieve the desired sorting, the developer can build a link to the application passing the sorting parameter in the URL. Lets say I have user A who needs to see the application sorted on column 1 ascending and column 2 descending, I simple create the link for this user and place it on a menu or send the link to the user directly. Now I have user B who needs to see the same application but sorted on column 3 descending and column 5 ascending, all I have to do is create the link with the proper parameters and give the user access to the link. The developer can create as many links as needed.

The templates that support this feature are: Multiple Record Retrieval, Display and Maintain Rows, and Grid Update Maintainer.

The URL parameters that control the sorting are:

sort_typ= a value of 0 will sort in descending order, a value of 1 will sort in ascending order.

cur_sort_col= list of comma separated fields, the order of the fields will match the order of the values for sort_typ. First value in sort_typ will correspond to the first field name in cur_sort_col, and continue with the rest of fields in the order they are included.

reorder=Y  tells the program that reorder sort parameters are being passed.

The link will look like this:
DDATA.I00010s?sort_typ=0,1&cur_sort_col=FIELD1,FIELD2&reorder=Y

DDATA = data dictionary or library
FIELD1 = the name of the field in your application
FIELD2 = the name of the field in your application

NOTE: these parameters are case sensitive, make sure to use the same case sensitivity as in the example.

Created: August 7, 2013 | Modified: June 6, 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

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

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.