Need help with % format handling

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
nlarson
Posts: 597
Joined: Thu Apr 14, 2011 7:56 pm

Need help with % format handling

Post by nlarson »

Many of attributes in my BOs user are Numbers formatted as percent, i.e. this Goal is 95% done. I only need the % for the edification of the users as a visual queue (not for calculations).

I am currently using the format string ‘#.00%’ as a typical example of my number fields., and have tried to escape the % symbol using single quotes (per the user doc example) with no luck. This seems to cause several issues, for example:

- Graphs treat these this as a decimal value, which is less than ideal
- Initial Value seems to dislike fractional setting I.e. 8.33 or 833% is accepted, but .0833 or 8.33% is considered invalid.
- On entry the user must manually input the % sign instead of just the numeric value
- Etc.

I really only want the % as a format symbol, not as an actual numeric %. I.e. if a user types in ‘95’, the system will show ‘95%’ but will store the value as ‘95’ not ‘.95’

Any ideas to a good work around would be much appreciated
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Could you have one attribute input and other field calculated & displayed. You could then use either attribute depending on the situation.
Tom - V8.8 build 3137 - MySql / PostGres
nlarson
Posts: 597
Joined: Thu Apr 14, 2011 7:56 pm

Post by nlarson »

I'd have to think that through, I think it would really make things way too complex were talking about dozens of fields and editing could get pretty ugly.

I did some testing and found that for ANY prefiix or suffix in a number field the charater must be typed exactly by the user. This seems like boarderline defet to me. This would mean that for any number field used in any AwareIM app, the user MUST know the prefix or suffix expected and manually enter it? sounds liek a training and usablity nightmare.

Further this type of behavior of making prefix/suffix a user input rather than system property limits Lacalization since a 'revenue' feild in say a multi-tentant CRM system could not allow for the local curreny symbol.

Seems like a defect or design issue to me. Thoughts?
nlarson
Posts: 597
Joined: Thu Apr 14, 2011 7:56 pm

Post by nlarson »

one other quick observation: if a rule is used to copy in the data then the prefix/suffix are not required, but are displayed correctly. I would think that a user and rule should be able ot have the same behavoirs.

I seem to recall a similar issue in another project using EXTJS, so might be a limitation of the framework.

and thanks for the input Tford.
nlarson
Posts: 597
Joined: Thu Apr 14, 2011 7:56 pm

Post by nlarson »

I was able to get some help on this from the Aware team, thought I would add it here to share., #2 was my fix.

we usually avoid putting these symbols as part of the number format (for the reasons that you described) and use various workarounds, for example:

1) If the value is displayed on the form, make "%" part of the field label:
Value,%: 90

2) Alternatively, if the value is displayed on the form make "%" part of the attribute's "presentation description" which is displayed to the right of the field (this option exists in the Presentation dialog for an attribute). As a result the field is displayed like this:
Value: 90 %

In this setup the user doesn't need to enter "%".

3) If the value is displayed in queries, make "%" part of the column label: Value,%.
It is better like this anyway, as the screen becomes less cluttered.

4) If the value is displayed in documents/presentations, make "%" part of the tag expression format (it is safe to do it in documents), for example:

<<MyObject.Value,#.00%>>
Post Reply