cLFlaVA
asked on
Native OS Style Fields - Alignment
Hello...
As the title suggests, I'd like to know how to get the data within an Native OS style field to right-align. The values are all currency and the client would like them all to line up right-justified, which makes sense, because that is how money should be displayed.
Any ideas?
Thanks
Cory
As the title suggests, I'd like to know how to get the data within an Native OS style field to right-align. The values are all currency and the client would like them all to line up right-justified, which makes sense, because that is how money should be displayed.
Any ideas?
Thanks
Cory
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ahh, good point. So would you suggest I use just a numeric field, and then store the $ in a separate field? Currently, I am storing the symbol in a separate field, so it won't be hard to chage to numeric...
and moreover CUrrency field has a major reputation of crashing servers.. SO better use Numeric field. Also if you are displaying a list of numeric values, then you can try using richtext, it has a method to rightalign
notesRichTextParagraphStyl e.Alignmen t = alignment%
Partha
notesRichTextParagraphStyl
Partha
ASKER
So I'd have to create a rich text field, then programatically right-align the values? It doesn't seem worth it. Would you guys say it just makes more sense to use the regular fields (not native os)?
Doing it the rich-text way would also require casting the values to numeric when I do any calculations on them...
Doing it the rich-text way would also require casting the values to numeric when I do any calculations on them...
Or as a label.... anything fixed that doesn't relate to the machine's settings.
ASKER
Label? That wouldn't work, since it's data the user will need to enter...
ASKER
So, numeric sounds good then...
ASKER
(decimal)
> Doing it the rich-text way would also require casting the values to numeric when I do any calculations on them...
Nope:
Keep the numeric fields for editing/computation. Use RT for display.
Haven't tried computed text yet.... could be easier!
Nope:
Keep the numeric fields for editing/computation. Use RT for display.
Haven't tried computed text yet.... could be easier!
When the users enter and save , just a small routine to append value to the richtext item and display it right aligned. Also maintain a hidden field to do all the calculations. This may sound little over head , but i don't see (atleast to my knowledge) any other way...
Partha
Partha
> Label? That wouldn't work, since it's data the user will need to enter...
If you label a field as "Price ($)" the user knows what to enter, wouldn't he?
If you label a field as "Price ($)" the user knows what to enter, wouldn't he?
ASKER
Alright, thanks a lot to both of you. I appreciate your help.
IF i come across any other alternative, will let u know
Thx for the points
Partha
Thx for the points
Partha
Here is a dirty alternative, but all the fields needs to be text :
assumign your field name to be untitled, in the input translation try this:
"8" is a number which you can decide...
Field Untitled:= @repeat(" ";8-@length(untitled))+ Untitled;Untitled
and when you calculate the sum just put this:
@Sum(@TextToNumber(@Trim(@ Text(Untit led):@Text (Untitled1 ):@Text(Un tiled2):@T ext(Untitl ed3))))
Hope this helps
partha
assumign your field name to be untitled, in the input translation try this:
"8" is a number which you can decide...
Field Untitled:= @repeat(" ";8-@length(untitled))+ Untitled;Untitled
and when you calculate the sum just put this:
@Sum(@TextToNumber(@Trim(@
Hope this helps
partha
ASKER