JSSP Data Types and Methods

The table below lists the various Service Object data types supported by the JSSP, the equivalent JavaScript types and where applicable, the Schema. You should also review Data Types considerations for details about specific considerations for certain data types.


SmartObject Type JavaScript Value Type Schema URI Example Notes
Text string  
Number number
(or string - see notes)
  • number
    • JS treats integers (number) as 64-bit floating point values. The precision may not always be exact
    • Max value is 2147483647
    • Minimum value is -2147483648.
    • Values outside the min and max will wrap around
    • If you need larger values, pass a string back.
  • string
    • This allows the JS developer to represent Int64 values within the product
    • Max value is 9223372036854775807
    • Min value is -9223372036854775808
  • Values within JS that are NaN, Infinity, -Infinity will be treated as 0, undefined will be treated as null.
Decimal decimal  
YesNo boolean  
DateTime dateTime
  • Min value is 01-01-0001
  • Max value is 12-31-9999
  • timezone adjustments might cause exceptions when values are close to the Min/Maxdate ranges
Date extendedDateTime k2.com/2019/date  
File attachment

 

  • object
    • filename: string with the name of the file that comes from the product
    • content: attachment with the content of the file. (You do not have access to the raw content, it is only used in conjunction with the FormData
      • size: an integer that always returns -1.
      • type: a string that always returns application/octet-stream
  • Uploads are not limited but the file upload control in SmartForms is limited by default to 16MB.
Copy

File attachment

//postresult using BLOB object without a filename
postResult({ "File": xhr.response });
//postresult using BLOB object with a filename
postResult({ "File": { filename: "testfile.json", content: xhr.response }
Image attachment k2.com/2019/image

"imageProperty": {
          displayName: "Image",
          description: "An image",
           type: "attachment",
           extendedType: "k2.com/2019/image"
}

  • object
    • filename: string with the name of the file that comes from the product
    • content: attachment with the content of the file. (You do not have access to the raw content, it is only used in conjunction with the FormData
      • size: an integer that always returns -1.
      • type: a string that always returns application/octet-stream
  • Uploads are not limited but the file upload control in SmartForms is limited by default to 16MB.
Memo extendedString k2.com/2019/memo "memoProperty": {
displayName: "Memo",
description: "A memo field",
type: "extendedString",
extendedType: "k2.com/2019/memo" }