pui.editWord( value, editWord, [options] );

Formats a number according to an edit word.  This JavaScript function is meant to work similarly to the %EDITW built-in function available in RPG.


  • value = numeric value or expression that is to be formatted
  • editWord = edit word format, same as you would use in IBM i applications
  • options = (optional) a JavaScript object with options to configure the edit word behavior
    • options.currencySymbol = Symbol used for currency. Must match the character provided in the editWord. Default: $
    • options.decimalFormat = Type of decimal formatting.  Blank is the default, and uses a period as the decimal separator.  Use I or J for a comma.


var myVal = 12.34;
var myString = pui.editWord( myVal, "    $0.  ");

// myString is now "   $12.34 "


pui.editWord first appeared in Profound UI 5.13.0