UDD Currency Format

If you think that something doesn't work in Aware IM post your message here
Post Reply
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

UDD Currency Format

Post by bondicoffee »

I am trying to print the currency with comma separate format
In BSV currency format is default $###,##.## and it gives proper output in form $123,456.78

But when I try to print the Currency in UDD Word document or Email using Tag, It prints currency without comma.
Tried following tags,
<<Customer.balance,$#0.00>> Output $123456.78
<<Customer.balance,$#00,000.00>> Output Error
<<Customer.balance,$###,##.##>> Output Error

I am unable to print proper format of currency ( $123,456.78 ) in UDD or Email.
I really appreciate any kind of help or suggestion.
Thanks
Last edited by bondicoffee on Thu Sep 14, 2017 3:58 am, edited 1 time in total.
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: UDD Currency Format

Post by customaware »

just use

<<Customer.balance,n>>
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: UDD Currency Format

Post by bondicoffee »

<<Customer.balance,n>> didn't worked for me.
I tried $<<Customer.balance,N>> that worked. But it prints $2,135,479.008333333333
ISSUE HERE
1) I have no control over decimal values I can't print without decimal values($2,135,479)
2) In the LIST_TABLE_START, I can't use "$<<Customer.balance,N>>", because the $ will be printed on first row only. Rest row will print amount without Currency Symbol

Has anyone come across such issue.

Thanks
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Re: UDD Currency Format

Post by Gabbitas »

Hi Bondicoffee,

Im facing the exact same issue as you describe above. Did you manage to find a solution?

Many thanks
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Re: UDD Currency Format

Post by Gabbitas »

Bondicoffee and anyone else who may come across this issue I am now taking the following steps to ensure continuity of formatting of currencies in AwareIM. Hope it might help...

In Forms and Queries

Any attribute that I want to hold currency inside my app has the checkbox ticked that is 'Number Represents Currency' inside attribute formatting. This will ensure that users are able to enter currency with two decimal places on a form without needing to enter the currency symbol. The currency symbol is appended by AwareIM when displaying attributes in forms and in queries (avoids NaN showing in queries) and the currency is displayed back in the following format Positive Numbers = £###,###,###,##0.00 Negative Numbers = £-###,###,###,##0.00.

In Regular Tags Inside User Defined Documents and Similar

Using the comma symbol to separate attribute from formatting will not work if the formatting uses comma's itself. Instead one must use the @ symbol in its place as the separator. For example: <<Project.ContractTotalIncVat@ £#,##0.00;(£###0.00)>>

Inside UDDs when using LIST, LIST_TABLE, LIST_LINE, LIST_TABLE_START etc...

Support advised that "Using any symbol in formats other than the standard ones, such as the pound symbol is not supported."

The work around to this is to do the formatting inside AwareIM in a text attribute and then pass that to the LIST function in the document. I have the following configured.

Attributes
Project.ContractTotalIncVat
Project.ContractTotalIncVat_AS_STRING
SystemSettings.CurrencySymbol

Rule on Project BO
Project.ContractTotalIncVat_AS_STRING=SystemSettings.CurrencySymbol+AS_STRING(Project.ContractTotalIncVat,'#,##0.00')

Inside the LIST function just use the string instead of the number
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: UDD Currency Format

Post by PointsWell »

Without knowing too much about your project..,

I avoid using the currency settings on numeric fields and instead use a reference data business object to store currency.

I am guessing that Project is a parent BO to all the chargeable line items, it should therefore be possible to use a short cut on line items to refer to the parent project.

There is also a currency function that should convert the ISO 3 currency code to a the symbol (though I have not used it) CURRENCY_SYMBOL('USD'), I would imagine that it should work with CURRENCY_SYMBOL(Project.CurrCode) or similar construct.

This approach has the benefit of allowing you to do "things" with the line items based on currency that would be more difficult with the currency embedded into the number field e.g. grouping all line items by currency which would be harder with embedded currency. It would also make reference to currency consistent without requiring text fields to format for usage elsewhere.
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: UDD Currency Format

Post by aware_support »

Use the "@" symbol as a delimiter between the attribute and format if your format has commas:

<<Customer.balance@$#00,000.00>>

rather than:

<<Customer.balance,$#00,000.00>>
Aware IM Support Team
Post Reply