Link to home
Start Free TrialLog in
Avatar of cLFlaVA
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
SOLUTION
Avatar of p_partha
p_partha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cLFlaVA
cLFlaVA

ASKER

Nah, Notes.  Sorry I didn't specify.
ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cLFlaVA

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

 notesRichTextParagraphStyle.Alignment = alignment%

Partha
Avatar of cLFlaVA

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...
Or as a label.... anything fixed that doesn't relate to the machine's settings.
Avatar of cLFlaVA

ASKER

Label?  That wouldn't work, since it's data the user will need to enter...
Avatar of cLFlaVA

ASKER

So, numeric sounds good then...
Avatar of cLFlaVA

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!
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
> 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?
Avatar of cLFlaVA

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
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