Format currency

07 Oct '11, 11:51 AM
53,478 Views
No Forum Badges

How may I format a column to currency in a index unit ?

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hi,

if you want to format the values of your numeric Attribute (i.e. price as float or decimal) you can change his pattern. The definition of locales and patterns is performed through the localization window. To access the localization window press the Localize button in the menu or right-click on an element and select Localize.

In fact in the Localize Window you can set and customize the default and customized pattern for each type of Attribute: - Boolean - Date - Decimal - Float - Integer - Time - Timestamp

For each datatype you can configure its properties. For example you can set for the Float datatype this pattern:

#,###.##$

and the result will be like this: 12,345.57$

I suggest you to define a subtype of the default pattern, in this way you can set the new type only for the Attribute which require the new pattern.

to create a custom subtype (i.e. "currency") you have to:

  • Select the Data Model item in the Outline View

  • Open the context menu by right clicking on the Data Model item

  • Add the subtype

  • Set the Type Property in the Properties View (i.e. float)

  • Rename it in currency

Now you can choose "currency" as type of your Attribute. Select the Attribute in the Entity and set the "currency" datatype as type Property in the Properties View.

You can configure the "currency" subtype pattern in the localization window as above.

Now you have to generate the project and when you surf your Web Application you will see the result.

   
x 3
Answer at this question and get points!

Related questions

404 on generated app page 500 error with WebRatio BPM 502 proxy error-generate and run Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME Admin area disabled aggiornamento fallito a causa di un errore interno Ajax and FCK Editor (WebRatio 5.x) AJAX events problem to external JavaScript Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Any sample deployment any webratio book ? Asking For a Book Attribute comparison in a selector unit Cannot invoke method putAll() on null object Cannot invoke method selectSingleNode() on null object Can't run any aplication Clarification about the NoOperation unit Code is exceeding the 65535 bytes limit error on JBOSS Codigo QR Como hacer un menu en webratio? Compare with the current time Component computation com.webratio.struts.exceptions.WRSecurityException: Invalid request target host Conditional Expression "greater than 0" on null fields Connection refused. Connect more query unit Content module page variable won't assign. coupled mandatory fields Create Unit with Date (Year only) Custom Attributes Condition Database Database connection, Host and Port number Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final DB in Data Service Project Debug configuration Description: Unknown tag 'wr:LinkResource' Dudas sobre modelado(Data Flow,Forms y Operation Create) Empty record mistakenly saved en_US codify problem error activating student account Error deploying WAR against to JBOSS Error updating metadata process Error when updating to WR 7.2.3 Export XML external link.= Filter information in a Simple List Filtros Caracteres Especiales Find Model Problemas forward/backward navigation and bookmark in ajax web app From BPM to WebProject - BUILD FAILED Generation errors on ajax enabled page with many components, ajax links and selective refresh "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Get Unit problem Get Year from Date Groovy script numer after an error HelloWorld Unit sample code Help for connect public and private site views Help with math unit. Debug mode says error as result code Hierarchy component How can i create pagemenu or landmarkmenu with multiple levels. How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? how to delete this error? How to display the attributes of a related entity. How to filter imported attributes? How to get a wr:AjaxURL tag working How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web i can't install mobile version on windows I can't install Webratio on my Desktop (Ubuntu 13.04 x64) I can't run any application with WebRatio (Table/View 'APP.POST' does not exist) Insert data into database Insert master page to many hybrid modules Installation with java 1.8 Installazione Macosx Integrating a BPM model into an existent WebML model invio mail fallito java.lang.NullPointerException java virtual machine error Job not start correctly JSON I/O Unit e informazioni derivate JSP/DO issues on Tomcat 5.5 (Ubuntu) KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Login Error Mail multipla maintain the record order in a sortable list mandatory control code parameter is missing Math Unit to update attributes of an entity? Mensaje: the selection cannot be launched and there are no recent launches Missing plugin emulation support error Missing units when importing project [MOBILE] How I extract information from JSON client side? Modifica Entità tramite file xml Multi Entry Unit: How to forward only checked rows? multi-lingual product description Multi Selects didn't work in update page Next Activity Note property - Error synchronizing with web project No access to protected site view with Login No Apache Derby driver found No database on my cloud account Non riesco a fare funzionare Xml out unit Page Home - First time the Project Web begins Parametrizzazione Selector Unit Problema al generar y ejecutar proyecto Problema generazione codice Problema Grafo da una lista gerarchica Problema ¨HTTP Status 404" Problemas con el Operations View Delete Problem: Compile Failed Problem Example create Unit (no company in employee table) problemi installazione su Mac sistema operativo OSX El Capitan Problem in adding diagrams in IFML Editor (Eclipse) problem on first deploy with webratio Problems to connect Sql Server DB from Webratio Problem syncing reports Problem to run an Application Problem with application runnung Problem with execution of webratio Problem with ireport Problem with query unit! Problem with Scroller Unit Problem with the deletion of more than 50.000 records in a table Project cannot be opened with WebRatio Community Platform query a database Question about Site Views Rename passing attributes Replace ID by its value in another table Sample web application Search by Selector component does not work Select between parameters Selector unit doesn't return any value in hybrid module Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit show/hide fields on button click (registration page) Showing items that have a relation with an entity [solved] all links transparent, why ? Solve "Generation Error" with Generate and Run option Something leads to wrong condition expression evaluation. Student reserved area, download error sumar atributos de una tabla filtrado por Role Condition Sum entity's values Table 'freeapp43.profesion' doesn't exist Tomcat external session store and WebRatio webapp. Transportation Link issue "Unable to close sub-context ..." Unable to compute the controller URL(s) for applicationUnable to compute the controller URL(s) for application having status PROVISIONING Unable to connect to Internet Unable to execute the script java.lang.NullPointerException Unable to find Cloud free function Unable to get ExpenseReport example work in WebRation Personl 7.2.2 Unable to instantiate a new application instance Unable to update the web project Unique Fields Unspecified BPM Engine Database Updating attributes of an entity User Login Timestamp using relationship role conditional with null usuarios y grupos utilizzo componenti database Visibility Condition on Multiple Links From Index Unit Webratio Add-ons no permite login Web Ratio Add-ons shop not working WEBRATIO LINUX AT EXECUTION TIME Web Ratio Mobile plateform Macos Sierra Web Ratio Mobile - Remote data mapping problem WebRation - Create Navigation diagram When execute my web application I have this error: returned a null bean XPCOM Error