Skip to content

Built In Templates & Formatting Functions

tremendo edited this page Dec 23, 2011 · 4 revisions


  • Mobile.SalesLogix.Template.nameLF

Formatting Functions

Remember, the first, and sometimes only, parameter is always the raw value. Some formatting functions take optional parameters, which can be easily applied using the Function.bindDelegate method.

  • SalesLogix
    • Mobile.SalesLogix.Format.address
      • Uses the same rules as the current SLX web client.
    • Mobile.SalesLogix.Format.currency
    • Mobile.SalesLogix.Format.nameLF
      • Applies Mobile.SalesLogix.Template.nameLF template.
  • SDK
    • Sage.Platform.Mobile.Format.encode
      • Escapes HTML entities.
    • Sage.Platform.Mobile.Format.mail
    • Sage.Platform.Mobile.Format.trim
      • Accepts an optional DateJS format string as the 2nd parameter.
    • Sage.Platform.Mobile.Format.fixed
      • Accepts an optional precision value as the 2nd parameter.
    • Sage.Platform.Mobile.Format.percent
    • Sage.Platform.Mobile.Format.yesNo
    • Sage.Platform.Mobile.Format.bool
    • Sage.Platform.Mobile.Format.nl2br
    • Sage.Platform.Mobile.Format.timespan
    • Sage.Platform.Mobile.Format.canvasDraw
      • This requires a canvas (DOM) object as second parameter
      • Optional options parameter to specify drawing properties: .scale, .lineWidth, .penColor
    • Sage.Platform.Mobile.Format.imageFromVector
      • Additional options accepted for generating <img> HTML element: .width, .height, .title

All SDK format functions are also applied to the product’s Format object, i.e. and are the same function.

You can’t perform that action at this time.