• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

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
0
cLFlaVA
Asked:
cLFlaVA
  • 7
  • 5
  • 4
2 Solutions
 
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now