You have the option of placing any functions or variables that you want to access from the expressions in your view model in a JavaScript include (.jsi) file. JavaScript include files facilitate code reuse.
Suppose your model requires converting Date objects into integers of the format “yyyymmdd.” Create a function like the following in your JSI file. You can then call it from multiple places within your view model (such as Projection column definitions).
// Convert a Date object to the form "YYYYMMDD" as an int function dateToInt(dateObject) { return dateObject.getFullYear() * 10000 + (dateObject.getMonth() + 1) * 100 + dateObject.getDate(); }
For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com