• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Ext.util.format.number - (GL Accounts) Sencha & Nitro Query App Builder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ext.util.format.number - (GL Accounts) Sencha & Nitro Query App Builder

    Is it possible to format a number which is a general ledger account stored as a number in DB2 (110010000) into a format like this? (1-1001-00-00) in Sencha? I am only seeing examples in Sencha forums of converting the decimal place and negative numbers.

    I am wanting to format the GL account numbers so they look like the current
    edit code: (' - - - ') that I use. I will be using this format in both Sencha Architect and Nitro Query App Builder.

    Thanks,

  • #2
    I was able to figure it out. I had to convert it to a string, then substring formatting.

    var acct = value.toString();
    return acct.substr(0,1) + '-' + acct.substr(1,4) + '-' + acct.substr(6,2) + '-' + acct.substr(8,2);

    Comment

    Working...
    X