{"id":1380,"date":"2008-02-29T03:45:05","date_gmt":"2008-02-29T09:45:05","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=1380"},"modified":"2024-01-04T11:59:18","modified_gmt":"2024-01-04T17:59:18","slug":"formatting-data-directly-within-the-html-skeleton","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/formatting-data-directly-within-the-html-skeleton","title":{"rendered":"Numeric Formatting with Freemarker"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><em>Click <a href=\"https:\/\/www.mrc-productivity.com\/legacy\/freemarker\/formatting-data-directly-within-the-html-skeleton\" data-type=\"URL\" data-id=\"https:\/\/www.mrc-productivity.com\/legacy\/general\/formatting-data-directly-within-the-html-skeleton\">here<\/a> to access legacy documentation for this feature<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">m-Power and Edit Codes<\/h2>\n\n\n\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 &#8220;J&#8221;, &#8220;X&#8221;, and &#8220;A&#8221;? Not to worry &#8212; not all of our customers are proficient with edit codes and now with m-Power applications, you don&#8217;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\n\n\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\n\n\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\n\n\n<h2 class=\"wp-block-heading\">Currency<\/h2>\n\n\n\n<p>Be sure to compile your application. After the program is compiled, enter m-Painter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodes1.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodes1.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>Left-click in the cell of the data field you wish to add formatting on (In our case it is the field named &#8220;Currency&#8221;). From the right-side Element Panel, select &#8220;Edit HTML&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodesEditHTML.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodesEditHTML.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\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\n\n\n<p><strong>Note:<\/strong> The entire field now reads <code>${row.CURRENCY_o?string.currency}<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editcodesCurrency.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editcodesCurrency.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The output is as follows (notice the &#8220;$&#8221; and the &#8220;.&#8221; Denoting cents):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editcodesCurrencyOutput.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editcodesCurrencyOutput.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">European Currency<\/h3>\n\n\n\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. Left-click in the cell of the data field you wish to reformat. On the right-hand Element Panel, select &#8220;Edit HTML&#8221;. The specific cell you selected will be displayed. Click the button to &#8220;Move to parent&#8221; to display the entire table row.<\/p>\n\n\n\n<p>Find the &lt;td> for the desired field to reformat and directly above the &lt;td> add: <code>&lt;!--&lt;#setting locale=\"hu\">--><\/code> and to your field add <code>FIELD_o?string.currency<\/code>. See below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodesEUCurrencyRow.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodesEUCurrencyRow.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>Your output will look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodesEUCurrencyOutput.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodesEUCurrencyOutput.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Percent<\/h2>\n\n\n\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\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodesPercent.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodesPercent.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The resulting output is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/editCodesPercentOutput.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"\/docs\/vue-images\/editCodesPercentOutput.jpg\" alt=\"\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;J&#8221;, &#8220;X&#8221;, and &#8220;A&#8221;? Not to worry &#8212; not all of our customers are proficient with edit&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[265],"ht-kb-tag":[],"class_list":["post-1380","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-freemarker"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=1380"}],"version-history":[{"count":7,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1380\/revisions"}],"predecessor-version":[{"id":13960,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1380\/revisions\/13960"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=1380"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=1380"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=1380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}