{"id":1380,"date":"2008-02-29T03:45:05","date_gmt":"2008-02-29T09:45:05","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=1380"},"modified":"2012-05-16T12:02:15","modified_gmt":"2012-05-16T17:02:15","slug":"formatting-data-directly-within-the-html-skeleton","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/freemarker\/formatting-data-directly-within-the-html-skeleton","title":{"rendered":"Formatting Data Directly within the HTML Skeleton"},"content":{"rendered":"<p><!-- Begin Content --><\/p>\n<h1>m-Power and Edit Codes<\/h1>\n<p>&nbsp;<\/p>\n<p>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 &quot;J&quot;, &quot;X&quot;, and &quot;A&quot;?  Not to worry &#8212; not all of our customers are proficient with edit codes and now with m-Power applications, you don&#39;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.<\/p>\n<p><strong>Note:<\/strong> 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.<\/p>\n<p>In addition, Edit Codes are primarily known for Numeric Fields.  The following manipulations modify your numeric fields into strings for additional manipulation capabilities.<\/p>\n<p><strong>Numeric Manipulation Examples<\/strong><\/p>\n<p><em>Pre-Defined Currency Formatting Mask<\/em><\/p>\n<p>Be sure to compile your application.  After the program is compiled, enter m-Painter.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes1.jpg\" \/><\/p>\n<p>Right click on the field you wish to add formatting on (In our case it is the field named &quot;Currency&quot;) and select &quot;Cell&quot; then &quot;Edit Cell HTML&quot;.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes2.jpg\" \/><\/p>\n<p>Within this text area, append the text <code>_o?string.currency<\/code> directly after the field name.  This <code>_o?string.currency<\/code> tells your field that you wish to utilize a currency mask on the field.<\/p>\n<p><strong>Note:<\/strong> The entire field now reads <code>${row.CURRENCY_o?string.currency}<\/code><\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes3.jpg\" \/><\/p>\n<p>The output is as follows (notice the &quot;$&quot; and the &quot;.&quot; Denoting cents):<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes4.jpg\" \/><\/p>\n<p><em>Pre-Defined Percent Formatting Mask<\/em><\/p>\n<p>Similarly, we can follow the same steps as above, this time adding <code>_o?string.percent<\/code> directly after the name of the field.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes5.jpg\" \/><\/p>\n<p>The resulting output is:<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes6.jpg\" \/><\/p>\n<p><em>Modifying the Code for European Currency<\/em><\/p>\n<p>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 &quot;Table&quot; then &quot;Edit Table HTML&quot;.<\/p>\n<p>Look for your currency field within this text area.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes7.jpg\" \/><\/p>\n<p>Directly above the table rows, add: <code>&lt;#setting locale=\"hu\"&gt;<\/code> and to your field add <code>FIELD_o?string.currency<\/code>.  See below:<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes8.jpg\" \/><\/p>\n<p>Your output will look like this:<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/editcodes9.jpg\" \/><\/p>\n<p><!-- End Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>m-Power and Edit Codes &nbsp; 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 &quot;J&quot;, &quot;X&quot;, and &quot;A&quot;? Not to worry &#8212; not all of our customers are proficient with edit codes and now with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1352,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1380","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=1380"}],"version-history":[{"count":6,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1380\/revisions"}],"predecessor-version":[{"id":3358,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1380\/revisions\/3358"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1352"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=1380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}