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
LVL 13
cLFlaVAAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_parthaCommented:
In web or notes client?, in web means, go the last tab of the field properties (html tab) and in the style give :
text-align:right

Partha
0
cLFlaVAAuthor Commented:
Nah, Notes.  Sorry I didn't specify.
0
CRAKCommented:
In notes? AFAIK you can't.

A side comment though...
Currency fields may have some undesired side effects. Enter 100 in your currency field and save the doc.
It now says e.g. $ 100.00 or € 100.00. Enough to have a good time in a pub!

Now change your system to display to e.g. Japanese Yen.
The application may show: ¥ 100.00. Insufficient for a busride home!

The same thing may happen if you replicate your db into other currency areas!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

cLFlaVAAuthor Commented:
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...
0
p_parthaCommented:
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

 notesRichTextParagraphStyle.Alignment = alignment%

Partha
0
cLFlaVAAuthor Commented:
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...
0
CRAKCommented:
Or as a label.... anything fixed that doesn't relate to the machine's settings.
0
cLFlaVAAuthor Commented:
Label?  That wouldn't work, since it's data the user will need to enter...
0
cLFlaVAAuthor Commented:
So, numeric sounds good then...
0
cLFlaVAAuthor Commented:
(decimal)
0
CRAKCommented:
> 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!
0
p_parthaCommented:
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
0
CRAKCommented:
> 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?
0
cLFlaVAAuthor Commented:
Alright, thanks a lot to both of you.  I appreciate your help.
0
p_parthaCommented:
IF i come across any other alternative, will let u know

Thx for the points

Partha
0
p_parthaCommented:
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(Untitled):@Text(Untitled1):@Text(Untiled2):@Text(Untitled3))))

Hope this helps

partha
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.