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.