mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Web 2.0 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 sometime? 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 Web 2.0 applications, you don’t need to be! The new flexibility of Web 2.0 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 flexible applications.
In addition, Edit Codes primarily are known for Numeric Fields. The following manipulations, available exclusively within Web 2.0, modify your numeric fields into strings for additional manipulation capabilities.
Numeric
Manipulation Examples
Pre-Defined Currency Formatting Mask
Be sure to compile your application with a “Web 2.0 Template.” 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 “Application Field Properties.

Within the “Representation” box, 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 to all for European
Currency
In some
European countries, $1,120.50 would be listed as 1 120,50.
To do this in m-Power,
Enter
Application Properties in m-Painter. Select the “Text Editing Only” option
under Edit_Type.
Note: This will turn off the WYSIWYG
feature for this application to allow for the added flexibility of modifying
the currency mask.
Enter
the source code in m-Painter and search for your currency field.
Directly
above the highlighted section, add: “<#setting locale=”hu”>
and to your field add FIELD_o?string.currency.
See below:

Your
output will look like this:
