This topic contains 8 replies, has 0 voices, and was last updated by dave.gilbert 12 years, 11 months ago.

  • Author
    Posts
  • #8464

    dave.gilbert

    Does anyone know of a way to get Formula(Numeric) result to return as Integer?

    When using Saved Searches, you have the option of adding formula columns. One of the types is Formula(Numeric). When using Formula(Numeric), the results appear to be Real numbers, displayed like this: 9999.99999

    I would like NetSuite to treat my result as an Integer, and display it like this: 9,999

    I’ve tried using SQL functions such as TO_NUMBER() and FLOOR(), but it hasn’t had the result I wanted.

    Any ideas?
    This is a cached copy. Click here to see the original post.

  • #8465

    chriscorcoran

    Have you tried the round function?

  • #8466

    dave.gilbert

    ROUND({fieldname}) returns 9999 (no comma after the thousands digit)

  • #8467

    rnedelkow

    You could try a Formula (Text) like to_char(({total}*1.1),’$99,999,999.99′).

    Thanks,

  • #8468

    dave.gilbert

    RE: Want to format a numeric formula result in a saved search

    Robert,

    That is simply awesome!

    Works like a charm. The results look a lot better when formatted that way. Thank you very much!

    Bonus question: It now formats as “left justified” – is there a way to make it revert to right justified?

    ~Dave

    p.s. I removed the “.99” part and, as expected, the decimal portion of the result went away. Nice.

  • #8469

    rnedelkow

    RE: Want to format a numeric formula result in a saved search

    Originally posted by dave.gilbert

    View Post

    It now formats as “left justified” – is there a way to make it revert to right justified?

    It should work with something like, ‘

    ‘ || to_char(({total}*1.1),’$99,999,999.99’) || ‘

    Cheers,

  • #8470

    dave.gilbert

    That works, exactly as written. Thanks again!

    Since we are on a roll, here’s another question:

    Let’s say I wanted to change the font size, color, put it in bold, etc. Is that possible?

    My experimentation so far suggests that NetSuite simply ignores additional html tags within the div. For example,

    yields right justified results, but no bold.

    I can see how one could really mess up the screen if allowed to do too much of this, but a little bit would be helpful.

  • #8471

    rnedelkow

    I use the HEX color value to display the font in green, ‘

    ‘ || ‘
    ‘ || to_char(({total}*1.1),’$99,999,999.99’) || ‘

    ‘ || ‘

    Thanks,

  • #8472

    dave.gilbert

    Hi Robert,

    Thanks once more!!! You must be some type of Jedi

    That’s enough info for me to experiment on my own and see what else might work.

    Best,

    ~Dave

You must be logged in to reply to this topic.