currency formatting

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

currency formatting

Post by Tom Morrison »

I was hoping to format currency with the "$" symbol.

However, if I define this format with the attribute, it seems to require me to always type a "$" before any amounts. I had hoped the "$" sign was only for display purposes. The format I had used was "$#.00", recognizing your manual suggests "$#,##0.00; ($#,##0.00). I would rather have the "-" than the parentheses.

I believe I was also getting errors on rules in which I was assigning simply a "0" as a value. Thought this might be a related issue.

Does AwareIM require typing of the "$" if it's included in the format?

Thanks!
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Tom,

> Does AwareIM require typing of the "$" if it's included in the format?
Yes, currently it does. The solution is not to make the "$" a part of the format for currency attributes, but add it to attribute labels as well as document template and report tags where required.
Aware IM Support Team
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

Please change this in future version

Post by Tom Morrison »

This ends up being an unacceptable inconvenience for users and (unless I'm missing something) and hassle for those developing to include as a label on forms. The default forms don't provide for this and making custom forms everywhere a "$" us desired could/would be a huge pain.

I guess an option would be to allow a symbol to preceed a field as part of the definition of the attribute. Although, I'm not sure this would be liked by all.

Thanks for the quick feedback.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Tom,

You definitely do not have to make a custom form just to change an attribute label. All you have to do is click the Presentation button on the attribute dialog, and change the text in the Label box on the attribute presentation dialog. That is it!

For example, if you have an attribute Amount, you could set its format to "#,##0.00" and the label to "Amount, $". Then it would be displayed on the auto-generated form like this:

Amount, $: [ 1,000.00]

We have a number of applications built using this approach and the users are happy with the results.
Aware IM Support Team
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

Thanks!

Post by Tom Morrison »

Well...once again, AwareIM proves to be quite a tool. Thanks for the response (I should have waited until I looked into this further!).
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

OK, but...

Post by Tom Morrison »

So...I went in and put the "$" in as I wanted. However, when the attribute is then Saved, the initial value is lost. It appears whenever I go into the Presentation dialogue and come back out, the Initial value remains as it was. However, after I do a "Save", the Initial value is gone. Appears to be a bug.
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

Save & Close

Post by Tom Morrison »

Actually, you have to do a Save and a Close and then re-open the object in order to see the missing Initial Value.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

We cannot reproduce this behavior on our systems using build 778. What build number do you have?

When you say the initial value is gone, do you mean it is not shown the next time you open the attribute dialog? Can you see the initial value in the attribute table for the business object?

Please let me know the name of the business object, name and type of the attribute, the initial value, the format and the label used in the presentation dialog so we can try to reproduce the situation using your values.
Aware IM Support Team
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

Post by Tom Morrison »

I'm using Version 1.5 (Build 763).

The business object name is "AmountDue". Its type is "Number".

The format used is #.00. The initial value entered was 0, but later showed up as .00

The reason this came to light was a result of my changing the format from $0.00 to #.00 (I did not want to require users to enter a "$" before the value). I got several errors indicating that a rule was in error, as the referenced attribute could be UNDEFINED. I checked and discovered the initial values were no longer present.

I can send along the .bsv file if you'd like to see how my application is configured. Note -- the current version does not expose this problem.
Tom Morrison
Posts: 51
Joined: Wed Mar 29, 2006 12:48 pm
Location: Pennsylvania, USA
Contact:

Post by Tom Morrison »

I'm using Version 1.5 (Build 763).

The business object name is "AmountDue". Its type is "Number".

The format used is #.00. The initial value entered was 0, but later showed up as .00

The reason this came to light was a result of my changing the format from $0.00 to #.00 (I did not want to require users to enter a "$" before the value). I got several errors indicating that a rule was in error, as the referenced attribute could be UNDEFINED. I checked and discovered the initial values were no longer present.

I can send along the .bsv file if you'd like to see how my application is configured. Note -- the current version does not expose this problem.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Tom,

When you specify an initial value for an attribute and then save/close/re-open the object/attribute, the system displays the initial value according to the specified format. If the format for a numeric attribute was defined as "$0.00" and the initial value was entered as "0", the next time the system will display it as "$0.00" since the "$" is now a part of the value (as discussed previously). If the format is later changed to "#0.00" then on attempt to save the attribute the system gives a validation error message "Please enter a valid initial value". This happens because "$" in the initial value is no longer a valid part of the value according to the new format.

This is not a bug but rather a result of the system visualizing the initial value according to the attribute format. The described behavior is observed in build 778. You can download and install the latest build and check if the problem you described still occurs. If it does, please send us the application configuration where the problem can be reproduced.
Aware IM Support Team
Post Reply