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
  • Freemarker
  • Formatting Data Directly within the HTML Skeleton
Back to Manual

m-Power and Edit Codes

 

Are you new to the IBM and not very familiar with Edit Codes? Or have you not dealt with Edit Codes in some time? Not sure the difference between "J", "X", and "A"? Not to worry — not all of our customers are proficient with edit codes and now with m-Power applications, you don't need to be! The new flexibility of m-Power applications will allow you to add edit codes directly to the source of your application.

Note: Of course, the standard edit codes that many of you are comfortable and familiar with will still work in the same fashion. However, this new method of adding edit codes allows for much more flexibility within your applications.

In addition, Edit Codes are primarily known for Numeric Fields. The following manipulations modify your numeric fields into strings for additional manipulation capabilities.

Numeric Manipulation Examples

Pre-Defined Currency Formatting Mask

Be sure to compile your application. After the program is compiled, enter m-Painter.

Right click on the field you wish to add formatting on (In our case it is the field named "Currency") and select "Cell" then "Edit Cell HTML".

Within this text area, append the text _o?string.currency directly after the field name. This _o?string.currency tells your field that you wish to utilize a currency mask on the field.

Note: The entire field now reads ${row.CURRENCY_o?string.currency}

The output is as follows (notice the "$" and the "." Denoting cents):

Pre-Defined Percent Formatting Mask

Similarly, we can follow the same steps as above, this time adding _o?string.percent directly after the name of the field.

The resulting output is:

Modifying the Code for European Currency

In some European countries, $1,120.50 would be listed as 1 120 ,50. To do this in m-Power, open m-Painter. Right-click on the main data table and select "Table" then "Edit Table HTML".

Look for your currency field within this text area.

Directly above the table rows, add: <#setting locale="hu"> and to your field add FIELD_o?string.currency. See below:

Your output will look like this:

Created: February 29, 2008 | Modified: May 16, 2012

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

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.